Skip to content

Commit

Permalink
fixup! DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
asaunier committed Dec 14, 2020
1 parent fadb0a1 commit a9b427e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions c2corg_api/scripts/es/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,12 @@ def get_tagged_documents(session, last_update):
last_update, len(tagged_documents)))
last_tagged = session.query(DocumentTagLog). \
order_by(DocumentTagLog.written_at.desc()).first()
log.info('Last tagged doc {} by user {} at {}'.format(
last_tagged.document_id, last_tagged.user_id, last_tagged.written_at))
if last_tagged:
log.info('Last tagged doc {} by user {} at {}'.format(
last_tagged.document_id, last_tagged.user_id,
last_tagged.written_at))
else:
log.info('No doc available in documents_tags_log')
return tagged_documents


Expand Down

0 comments on commit a9b427e

Please sign in to comment.