Browse Source

prunepingsslow command skips checks with user_id=null

pull/29/head
Pēteris Caune 9 years ago
parent
commit
b592e5b449
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      hc/api/management/commands/prunepingsslow.py

+ 2
- 2
hc/api/management/commands/prunepingsslow.py View File

@ -20,8 +20,8 @@ class Command(BaseCommand):
for user in User.objects.filter(profile=None):
Profile.objects.for_user(user)
checks = Check.objects.annotate(
limit=F("user__profile__ping_log_limit"))
checks = Check.objects.filter(user__isnull=False)
checks = checks.annotate(limit=F("user__profile__ping_log_limit"))
for check in checks:
q = Ping.objects.filter(owner_id=check.id)


Loading…
Cancel
Save