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

serializers: fix error when no bf:Publication #3139

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

PascalRepond
Copy link
Contributor

  • When no provisionActivity of type bf:publication is present, the collector returns None rather than an empty generator.
  • Fixes RT 412.
  • Fixes Sentry RERO-ILS-2D1.

Co-Authored-by: Pascal Repond [email protected]
Co-Authored-by: Renaud Michotte [email protected]

@PascalRepond PascalRepond added the bug Breaks something but is not blocking label Oct 17, 2022
@PascalRepond PascalRepond force-pushed the rep-fix-inventory-export branch from c45b40d to 176e3f7 Compare October 17, 2022 13:47
@PascalRepond PascalRepond force-pushed the rep-fix-inventory-export branch 2 times, most recently from f1e66b0 to ba99174 Compare October 24, 2022 14:20
@PascalRepond PascalRepond requested a review from jma October 25, 2022 06:35
* When no `provisionActivity` of type `bf:publication` is present,
the collector returns None rather than an empty generator.
* Fixes RT 412.
* Fixes Sentry RERO-ILS-2D1.

Co-Authored-by: Pascal Repond <[email protected]>
Co-Authored-by: Renaud Michotte <[email protected]>
@PascalRepond PascalRepond force-pushed the rep-fix-inventory-export branch from ba99174 to 8bb1b73 Compare October 25, 2022 09:08
Comment on lines +149 to +152
if any(
(provision_activity := prov).get('type' == 'bf:Publication')
for prov in data.get('provisionActivity', [])
):
Copy link
Contributor

Choose a reason for hiding this comment

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

First time I see this structure ! Nice 👍

@PascalRepond PascalRepond merged commit 8a6709b into rero:staging Oct 27, 2022
@PascalRepond PascalRepond deleted the rep-fix-inventory-export branch October 27, 2022 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Breaks something but is not blocking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants