-
Notifications
You must be signed in to change notification settings - Fork 0
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
Implement LoanCheckout model for gathering history #9
Conversation
72f0dc1
to
e9139f3
Compare
core/model/patron.py
Outdated
license_pool_id = Column(Integer, ForeignKey("licensepools.id"), index=True) | ||
license_pool: Mapped[LicensePool] = relationship("LicensePool") | ||
|
||
license_id = Column(Integer, ForeignKey("licenses.id"), index=True, nullable=True) |
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.
Is license_id needed?
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.
@ttuovinen or @jompu might be able to answer.
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.
There's no licence_id available when saving the history item, so I've omitted the field for now.
e9139f3
to
61c7929
Compare
# Renewals are counted as checkouts | ||
assert 2 == len(circulation_api.patron.loan_checkouts) | ||
|
||
# Loans of open-access books go through a different code |
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.
Should we include open-access books in checkout history?
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.
We don't know if there will be such titles in the library collection, at least not at the beginning.
2461ae4
to
8e52465
Compare
8e52465
to
f83a5e8
Compare
Something to note is that the next time there are database changes in the upstream project, the changes from this downstream migration need to be merged back into the upstream branch. This process is explained here: https://alembic.sqlalchemy.org/en/latest/branches.html |
Description
Context found at https://jira.lingsoft.fi/browse/SIMPLYE-195
How Has This Been Tested?