0
0
Fork 0
mirror of https://github.com/healthchecks/healthchecks.git synced 2025-04-07 22:25:35 +00:00

Fix mypy warning

This commit is contained in:
Pēteris Caune 2023-10-12 11:55:47 +03:00
parent 2276fcff60
commit 7b03e1f95b
No known key found for this signature in database
GPG key ID: E28D7679E9A9EDE2

View file

@ -222,9 +222,9 @@ def checks(request: AuthenticatedHttpRequest, code: UUID) -> HttpResponse:
pairs = list(tags_statuses.items())
pairs.sort(key=lambda pair: pair[0].lower())
channels = project.channel_set
# Sort group first, then in the creation order
channels = channels.annotate(is_group=Case(When(kind="group", then=0), default=1))
is_group = Case(When(kind="group", then=0), default=1)
channels = project.channel_set.annotate(is_group=is_group)
# Sort groups first, then in the creation order
channels = channels.order_by("is_group", "created")
hidden_checks = set()