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

ebooks: fix holdings update when importing ebooks #984

Merged
merged 1 commit into from
May 19, 2020

Conversation

rerowep
Copy link
Contributor

@rerowep rerowep commented May 11, 2020

Why are you opening this PR?

How to test?

  • Try to harvest multiple times from ebooks and verify harvested ebooks and attached holdings

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?
  • Extracted translations?

@rerowep rerowep self-assigned this May 11, 2020
@rerowep rerowep marked this pull request as draft May 11, 2020 13:25
@rerowep rerowep force-pushed the wep-#1478-ebook branch 9 times, most recently from a41fcd1 to d0d3fbd Compare May 13, 2020 09:45
@rerowep rerowep changed the title Wep #1478 ebook oaiharvesting: import of ebooks May 13, 2020
@rerowep rerowep marked this pull request as ready for review May 13, 2020 13:13
@rerowep rerowep force-pushed the wep-#1478-ebook branch from d0d3fbd to 23a406c Compare May 13, 2020 13:17
@rerowep rerowep requested a review from BadrAly May 13, 2020 13:17
@rerowep rerowep force-pushed the wep-#1478-ebook branch 3 times, most recently from 4c6491f to ee5be1f Compare May 13, 2020 21:28
@rerowep rerowep requested review from jma and lauren-d May 14, 2020 12:14
@rerowep rerowep force-pushed the wep-#1478-ebook branch from ee5be1f to 5ea0f6f Compare May 16, 2020 07:37
@rerowep rerowep added this to the v0.9.0 milestone May 17, 2020
Copy link

@iGormilhit iGormilhit left a 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/tasks.py Show resolved Hide resolved
)

source_uris = []
for harvested_source in harvested_sources:
Copy link
Contributor

Choose a reason for hiding this comment

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


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', []):
Copy link
Contributor

Choose a reason for hiding this comment

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

you can use filter

@rerowep rerowep force-pushed the wep-#1478-ebook branch from 5ea0f6f to 358c4c2 Compare May 18, 2020 15:13
@rerowep rerowep changed the title oaiharvesting: import of ebooks ebooks: fix holdings update when importing ebooks May 18, 2020
@rerowep rerowep requested a review from iGormilhit May 18, 2020 20:39
Copy link

@iGormilhit iGormilhit left a comment

Choose a reason for hiding this comment

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

Commit message approved.

@rerowep rerowep force-pushed the wep-#1478-ebook branch from 358c4c2 to e2e909b Compare May 19, 2020 06:56
* Corrects creation, merging and deletetions of holding
records for ebooks.

Co-Authored-by: Peter Weber <peter.weber@rero.ch>
@rerowep rerowep force-pushed the wep-#1478-ebook branch from e2e909b to b05cecc Compare May 19, 2020 09:03
@rerowep rerowep merged commit cd080a1 into rero:dev May 19, 2020
@rerowep rerowep deleted the wep-#1478-ebook branch May 20, 2020 08:34
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.

4 participants