From ba34b9eb51248821095dbf76a8af23f7112dd47c Mon Sep 17 00:00:00 2001 From: Trey <73353716+TreyWW@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:22:51 +0100 Subject: [PATCH] fixed mypy issues Signed-off-by: Trey <73353716+TreyWW@users.noreply.github.com> --- backend/service/maintenance/expire/run.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/backend/service/maintenance/expire/run.py b/backend/service/maintenance/expire/run.py index 4c3d8389..cf2a8164 100644 --- a/backend/service/maintenance/expire/run.py +++ b/backend/service/maintenance/expire/run.py @@ -26,9 +26,7 @@ def expire_and_cleanup_objects() -> str: for model in model_list: # Delete objects that have been inactive and expired for more than 14 days - over_14_days_expired: QuerySet[models.Model] = model.all_objects.filter( - expires__lte=now - timedelta(days=14) - ) # type: ignore[attr-defined] + over_14_days_expired = model.all_objects.filter(expires__lte=now - timedelta(days=14)) # type: ignore[attr-defined] deleted_items += over_14_days_expired.count() over_14_days_expired.delete()