-
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
api: test existence of pid's #853
api: test existence of pid's #853
Conversation
ddfda05
to
7f89fe8
Compare
78a1c5d
to
a9e936a
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.
Missing still the patron_types, ebooks, invoices.
316c05f
to
bd6c33c
Compare
|
bd6c33c
to
31c776d
Compare
aae3e6f
to
fe59975
Compare
fe59975
to
9e443df
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 proposition:
api: test if a PID is already existing
A method is needed to verify if a PID is already existing as the
system creates or updates a resource, in order to avoid ending
up with two records sharing the same PID.
* Adds functionality to test pids for existence.
* Test during acq_accounts creation and update the existence of pids.
* Test during acq_invoices cration and update the existence of pids.
* Test during acq_order_lines creation and update the existence of pids.
* Test during acq_orders creation and update the existence of pids.
* Test during holdings creation and update the existence of pids.
* Test during items creation and update the existence of pids.
* Test during loans creation and update the existence of pids.
* Test during patron_types creation and update the existence of pids.
* Closes #850.
9e443df
to
738b0d8
Compare
738b0d8
to
b79f23c
Compare
b9ee0a1
to
d25813b
Compare
rero_ils/modules/api.py
Outdated
if not id_: | ||
id_ = uuid4() | ||
cls.minter(id_, data) | ||
if cls.pids_exist_check: | ||
from .utils import pids_exists_in_data | ||
pids_exists_in_data( |
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.
From my point of view this code should be in the validate method and should raise a validation error
df351e7
to
0720964
Compare
Method are needed to verify if a PID is already existing as the system creates or updates a resource, in order to avoid ending up with two records sharing the same PID and whether a reference in the record to a different record exists. * Adds functionality to test pids for existence. * Test during acq_accounts creation and update existence of pids. * Test during acq_invoices cration and update existence of pids. * Test during acq_order_lines creation and update existence of pids. * Test during acq_orders creation and update existence of pids. * Test during holdings creation and update existence of pids. * Test during items creation and update existence of pids. * Test during loans creation and update existence of pids. * Test during patron_types creation und update existence of pids. * closes rero#850 Co-Authored-by: Peter Weber <[email protected]>
0720964
to
392c4a8
Compare
Co-Authored-by: Peter Weber [email protected]
Why are you opening this PR?
How to test?
Code review check list