Skip to content

Commit

Permalink
fixed mypy issues
Browse files Browse the repository at this point in the history
Signed-off-by: Trey <[email protected]>
  • Loading branch information
TreyWW committed Oct 2, 2024
1 parent 10275a8 commit ba34b9e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions backend/service/maintenance/expire/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit ba34b9e

Please sign in to comment.