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

Update existing sources/access points on import, bulletproof publication date validation #776

Merged
merged 9 commits into from
Sep 22, 2021

Conversation

hancush
Copy link

@hancush hancush commented Sep 1, 2021

Overview

This PR updates the logic of the import to create or update existing access points and sources. Most of the changes here are reorganizations of existing code.

Connects #763.

Testing Instructions

  • Confirm CI passes.

@hancush hancush requested a review from fgregg September 21, 2021 16:15

new_source, created = Source.objects.get_or_create(**source_info)
for prefix in ('published', 'created', 'uploaded'):
Copy link
Collaborator

Choose a reason for hiding this comment

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

this timestampe handling would be good to factor out to a separate function/method.

Copy link
Author

Choose a reason for hiding this comment

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

Good thought, @fgregg. Revised in 7f6cb48. Separating that concern makes the loop more coherent, IMO.

@hancush hancush requested a review from fgregg September 22, 2021 14:47
@hancush hancush merged commit 071617d into hcg/import-patches Sep 22, 2021
@hancush hancush deleted the hcg/publication-date branch September 27, 2021 20: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.

2 participants