Skip to content

Commit

Permalink
patrons: ignore created loans at patrons deletion
Browse files Browse the repository at this point in the history
Co-Authored-by: Aly Badr <aly.badr@rero.ch>
  • Loading branch information
Aly Badr authored and iGor milhit committed Sep 2, 2021
1 parent c4276c5 commit f563817
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rero_ils/modules/patrons/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ def get_number_of_loans(self):
"""Get number of loans."""
from ..loans.api import LoanState
exclude_states = [
LoanState.CANCELLED, LoanState.ITEM_RETURNED]
LoanState.CANCELLED, LoanState.ITEM_RETURNED, LoanState.CREATED]
if self.pid:
results = current_circulation.loan_search_cls()\
.filter('term', patron_pid=self.pid)\
Expand Down

0 comments on commit f563817

Please sign in to comment.