Skip to content

Commit

Permalink
saving timestamps (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
femalves committed Apr 18, 2024
1 parent 3bbdee4 commit 8549dff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions biblib/views/library_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,7 @@ def solr_update_library(cls, library_id, solr_docs, session):
for bibcode in library.bibcode:

if "timestamp" not in library.bibcode[bibcode].keys():
update = True
library.bibcode[bibcode]["timestamp"] = default_timestamp
library.bibcode[bibcode]["timestamp"] = default_timestamp

# Update if its an alternate
if bibcode in alternate_bibcodes:
Expand All @@ -176,6 +175,8 @@ def solr_update_library(cls, library_id, solr_docs, session):
updates['duplicates_removed'] += 1
else:
new_library_bibcodes[bibcode] = library.bibcode[bibcode]
session.add(library)
session.commit()
if updates['update_list']:
cls.update_database(session, library, new_library_bibcodes, updates)

Expand Down

0 comments on commit 8549dff

Please sign in to comment.