Skip to content

Commit

Permalink
Updated default_timestamp to library created date.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjacovich committed Aug 3, 2023
1 parent 6bef6ca commit 68d4499
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion biblib/views/library_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,6 @@ def solr_update_library(library_id, solr_docs):
canonical_bibcodes = []
alternate_bibcodes = {}
new_bibcode = {}
default_timestamp = datetime.timestamp(datetime(2022,1,1))

# Constants for the return dictionary
num_updated = 0
Expand All @@ -203,6 +202,8 @@ def solr_update_library(library_id, solr_docs):

with current_app.session_scope() as session:
library = session.query(Library).filter(Library.id == library_id).one()
default_timestamp = datetime.timestamp(library.date_created)

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

0 comments on commit 68d4499

Please sign in to comment.