optimize query

This commit is contained in:
wh1te909 2023-04-07 20:21:22 +00:00
parent 19bc720bc9
commit a40858adbf
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ class Command(BaseCommand):
)
return
agents = Agent.objects.defer(*AGENT_DEFER)
agents = Agent.objects.select_related("site__client").defer(*AGENT_DEFER)
if days:
overdue = djangotime.now() - djangotime.timedelta(days=days)