Skip to content

Commit

Permalink
loan: add location pickup_name on dump
Browse files Browse the repository at this point in the history
* Adds the location pickup_name field on circulation information.
* Closes #3433.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
  • Loading branch information
Garfield-fr committed Aug 31, 2023
1 parent f12ca52 commit 9302a41
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rero_ils/modules/loans/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,13 @@ def dumps_for_circulation(self):
ptrn_data['last_name'], ptrn_data['first_name']))
if loan.get('pickup_location_pid'):
location = Location.get_record_by_pid(loan['pickup_location_pid'])
location_name = location.get('name')
data['pickup_location'] = {
'name': location.get('name'),
'name': location_name,
'pickup_name': location.get(
'pickup_name',
f'{location.get_library().get("code")}:'
f' {location.get("name")}'),
'library_name': location.get_library().get('name')
}

Expand Down

0 comments on commit 9302a41

Please sign in to comment.