Skip to content

Commit b45058e

Browse files
committed
patrons: add user data in error message
* Adds user information for `more than one librarian account` problem. Co-Authored-by: Peter Weber <[email protected]>
1 parent f3bb64a commit b45058e

File tree

1 file changed

+1
-1
lines changed
  • rero_ils/modules/patrons

1 file changed

+1
-1
lines changed

rero_ils/modules/patrons/api.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ def get_librarian_by_user(cls, user):
314314
patrons = cls.get_patrons_by_user(user)
315315
librarians = list(filter(lambda ptrn: ptrn.is_librarian, patrons))
316316
if len(librarians) > 1:
317-
raise Exception('more than one librarian account for a user')
317+
raise Exception(f'more than one librarian account for {user}')
318318
if len(librarians) == 0:
319319
return None
320320
return librarians[0]

0 commit comments

Comments
 (0)