mirror of
https://github.com/ae-utbm/sith.git
synced 2026-02-08 08:31:28 +00:00
remove fmt: off
This commit is contained in:
@@ -65,10 +65,10 @@ class Command(BaseCommand):
|
|||||||
"""Fetch the users which have a pending account dump."""
|
"""Fetch the users which have a pending account dump."""
|
||||||
threshold = now() - settings.SITH_ACCOUNT_DUMP_DELTA
|
threshold = now() - settings.SITH_ACCOUNT_DUMP_DELTA
|
||||||
ongoing_dump_operations: QuerySet[AccountDump] = (
|
ongoing_dump_operations: QuerySet[AccountDump] = (
|
||||||
AccountDump.objects.ongoing()
|
AccountDump.objects.ongoing().filter(
|
||||||
.filter(customer__user=OuterRef("pk"), warning_mail_sent_at__lt=threshold)
|
customer__user=OuterRef("pk"), warning_mail_sent_at__lt=threshold
|
||||||
) # fmt: off
|
)
|
||||||
# cf. https://github.com/astral-sh/ruff/issues/14103
|
)
|
||||||
return (
|
return (
|
||||||
User.objects.filter(Exists(ongoing_dump_operations))
|
User.objects.filter(Exists(ongoing_dump_operations))
|
||||||
.annotate(
|
.annotate(
|
||||||
|
|||||||
Reference in New Issue
Block a user