-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
notifications: fix German availability template #2083
notifications: fix German availability template #2083
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commit message proposition:
notifications: fix German availability template
* Fixes the display of the next opened day of the library.
In the title, notifications with an 's'.
fbbeb43
to
4ea5878
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure ? For me the problem seems to be in other templates.
We're teellng that a book is available at a "pickup_location", it seems normal to use this "pickup_location" to determine the next_open
If I understand the code right, the library is the pickup_location: if pickup_location:
data['loan']['pickup_location'] = \
pickup_location.replace_refs().dumps()
# del(data['loan']['pickup_location_pid'])
library_pid = data['loan']['pickup_location']['library']['pid']
library = Library.get_record_by_pid(library_pid)
data['loan']['pickup_name'] = pickup_location['pickup_name']
data['loan']['library'] = library
# TODO: make availability days variable (fixed to 10 days)
keep_until = datetime.now(timezone.utc) + timedelta(days=10)
next_open = library.next_open(keep_until)
# language = data['loan']['patron']['communication_language']
next_open = next_open.strftime("%d.%m.%Y")
data['loan']['library']['next_open'] = next_open |
* Fixes the display of the next opened day of the library. Co-Authored-by: Peter Weber <peter.weber@rero.ch>
4ea5878
to
8927047
Compare
Co-Authored-by: Peter Weber peter.weber@rero.ch
Why are you opening this PR?
Dependencies
My PR depends on the following
rero-ils-ui
's PR(s):How to test?
Code review check list