Skip to content

Commit

Permalink
fix(updated): actually update updated_date when modifying record
Browse files Browse the repository at this point in the history
  • Loading branch information
Avantol13-machine-user committed Oct 22, 2020
1 parent a74f12c commit 5002383
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions indexd/index/drivers/alchemy.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,6 +878,8 @@ def update_blank_record(self, did, rev, size, hashes, urls, authz=None):

record.rev = str(uuid.uuid4())[:8]

record.updated_date = datetime.datetime.utcnow()

session.add(record)
session.commit()

Expand Down Expand Up @@ -1207,6 +1209,8 @@ def update(self, did, rev, changing_fields):

record.rev = str(uuid.uuid4())[:8]

record.updated_date = datetime.datetime.utcnow()

session.add(record)

return record.did, record.baseid, record.rev
Expand Down

0 comments on commit 5002383

Please sign in to comment.