-
Notifications
You must be signed in to change notification settings - Fork 25
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
ebooks: fix holdings update when importing ebooks #984
Conversation
a41fcd1
to
d0d3fbd
Compare
4c6491f
to
ee5be1f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message title proposition: "ebooks: fix holdings update when importing ebooks"
rero_ils/modules/ebooks/utils.py
Outdated
) | ||
|
||
source_uris = [] | ||
for harvested_source in harvested_sources: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use filter: https://book.pythontips.com/en/latest/map_filter.html#filter
|
||
for holding_pid in Holding.get_holdings_pid_by_document_pid(pid): | ||
holding = Holding.get_record_by_pid(holding_pid) | ||
for electronic_location in holding.get('electronic_location', []): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use filter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message approved.
* Corrects creation, merging and deletetions of holding records for ebooks. Co-Authored-by: Peter Weber <peter.weber@rero.ch>
Why are you opening this PR?
How to test?
Code review check list