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

S3 key already contains the DOI #445

Merged
merged 1 commit into from
Sep 28, 2022
Merged

S3 key already contains the DOI #445

merged 1 commit into from
Sep 28, 2022

Conversation

carolyncole
Copy link
Member

@carolyncole carolyncole commented Sep 27, 2022

Let's utilize the key instead of the file name. This stops an infinite loop from occurring in tests when we trigger the validation and for S3 files to not get added repeatedly when s3 is queried. See https://pdc-describe-staging.princeton.edu/describe/works/75 for an example of a work where the files got added each time the work was saved

ActiveStorage::File to_s changes the slashes to underscores, so the names were not matching and the

@pulbot pulbot temporarily deployed to staging September 27, 2022 15:32 Inactive
@carolyncole carolyncole marked this pull request as ready for review September 28, 2022 12:23
Lets utilize the key instead of the file name.  This stops an infinite loop from accuring in tests and for S3 files to not get added repeatedly when s3 is queried.
See https://pdc-describe-staging.princeton.edu/describe/works/75 for an example of a work where the files got added each time the work was saved
@hectorcorrea hectorcorrea merged commit 1603370 into main Sep 28, 2022
@hectorcorrea hectorcorrea deleted the s3-keys branch September 28, 2022 16:14
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.

None yet

3 participants