Skip to content

Commit

Permalink
iterate through docs only if available
Browse files Browse the repository at this point in the history
  • Loading branch information
Sandravaphilips committed Nov 16, 2024
1 parent da9913e commit 40a35ac
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions peachjam/models/citations.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,10 @@ def re_extract_citations(self):
later_documents.count(),
self.processing_date,
)
for document in later_documents.iterator():
extract_citations(document.id, creator=document)

if later_documents.count():
for document in later_documents.iterator():
extract_citations(document.id, creator=document)

self.reset_processing_date()

Expand Down

0 comments on commit 40a35ac

Please sign in to comment.