Skip to content

Commit

Permalink
items: receive incorrect status after migrating Virtua loans
Browse files Browse the repository at this point in the history
Forces item status to on_loan for checked items.
Fixes rero#1974

Co-Authored-by: Aly Badr <aly.badr@rero.ch>
  • Loading branch information
Aly Badr committed Jun 5, 2021
1 parent 015ac76 commit 8e69a65
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rero_ils/modules/loans/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ def load_virtua_transactions(
build_loan_record(transaction, transaction_type, item)
try:
Loan.create(transaction, dbcommit=True, reindex=True)
if transaction_type == 'checkout':
item['status'] = ItemStatus.ON_LOAN
item.update(item, dbcommit=True, reindex=True)
click.secho(
'\ntransaction # {counter} created'.format(
counter=counter
Expand Down

0 comments on commit 8e69a65

Please sign in to comment.