don't use query content view if data is present

This commit is contained in:
Maximilian Hils 2021-03-29 09:00:32 +02:00
parent 1af5300cd2
commit c195737a0c
1 changed files with 4 additions and 1 deletions

View File

@ -15,4 +15,7 @@ class ViewQuery(base.View):
return "Query", base.format_text("")
def render_priority(self, data: bytes, *, http_message: Optional[http.Message] = None, **metadata) -> float:
return 0.3 * float(bool(getattr(http_message, "query", False)))
return 0.3 * float(bool(
getattr(http_message, "query", False)
and not data
))