Skip to content
Snippets Groups Projects
Commit e32e39e0 authored by adeelehsan's avatar adeelehsan
Browse files

Fixing notify credentials job

To save the memory get cert and grade object directly from
the db because by doing that we'll override the queryset
evaluation and object won't be cached once it has gone out
of scope.

PROD-987
parent 439e4b41
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,10 @@ def paged_query(queryset, delay, page_size):
if delay and page:
time.sleep(delay)
for i, item in enumerate(subquery, start=1):
yield page_start + i, item
index = 0
for item in subquery.iterator():
index += 1
yield page_start + index, item
class Command(BaseCommand):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment