Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(updated): actually update updated_date when modifying record #294

Merged
merged 1 commit into from
Oct 22, 2020

Conversation

Avantol13
Copy link
Contributor

New Features

Breaking Changes

Bug Fixes

  • update updated_date when modifying record

Improvements

Dependency updates

Deployment changes

@github-actions
Copy link

The style in this PR agrees with black. ✔️

This formatting comment was generated automatically by a script in uc-cdis/wool.

@@ -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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all other dates in indexd use .now() so if you want to use .utcnow() maybe we should change it everywhere? 😕

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh nvm, i'm wrong, only unit tests use .now()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's what it uses when it creates the record in the db 😬 so I went based off that

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at least, it's the default

created_date = Column(DateTime, default=datetime.datetime.utcnow)

@Avantol13 Avantol13 merged commit 03661c2 into master Oct 22, 2020
@Avantol13 Avantol13 deleted the fix/updated branch October 22, 2020 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants