Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
circulation: upgrade to invenio circulation v1.0.0a14
Browse files Browse the repository at this point in the history
* Adds $ref to item in then loan record.
* Improves circulation excpetions and parameters.

Co-Authored-by: Aly Badr <aly.badr@rero.ch>
Aly Badr committed Jul 25, 2019
1 parent 0bbd6f5 commit f765497
Showing 11 changed files with 143 additions and 78 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@ PyYAML = ">=3.13"
rero-ils = {editable = true, path = "."}
uwsgi = ">=2.0"
invenio-oaiharvester = {ref = "v1.0.0a4", git = "https://github.com/inveniosoftware/invenio-oaiharvester.git"}
invenio-circulation = {ref = "v1.0.0a8", git = "https://github.com/inveniosoftware/invenio-circulation.git"}
invenio-circulation = {ref = "v1.0.0a14", git = "https://github.com/inveniosoftware/invenio-circulation.git"}
pipenv = "*"
requests = ">=2.20.0"
flask-oauthlib = "*"
139 changes: 78 additions & 61 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion rero_ils/config.py
Original file line number Diff line number Diff line change
@@ -59,6 +59,7 @@
from .modules.item_types.api import ItemType
from .modules.items.api import Item, ItemsIndexer
from .modules.libraries.api import Library
from .modules.loans.api import Loan
from .modules.loans.utils import can_be_requested, get_default_loan_duration, \
get_extension_params, is_item_available_for_checkout, \
loan_satisfy_circ_policies
@@ -999,6 +1000,9 @@ def _(x):
Item.get_document_pid_by_item_pid
CIRCULATION_ITEMS_RETRIEVER_FROM_DOCUMENT = Item.get_items_pid_by_document_pid

CIRCULATION_DOCUMENT_EXISTS = Document.get_record_by_pid
CIRCULATION_ITEM_REF_BUILDER = Loan.loan_build_item_ref

# This is needed for absolute URL (url_for)
# SERVER_NAME = 'localhost:5000'
# CIRCULATION_REST_ENDPOINTS = {}
@@ -1091,7 +1095,7 @@ def _(x):
checkout=dict(
duration_default=get_default_loan_duration,
duration_validate=loan_satisfy_circ_policies,
item_available=is_item_available_for_checkout
item_can_circulate=is_item_available_for_checkout
),
extension=dict(
from_end_date=False,
Loading

0 comments on commit f765497

Please sign in to comment.