-
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
instance: fix several bugs #606
Conversation
f0413a3
to
fd8d498
Compare
fd8d498
to
60f348a
Compare
rero_ils/modules/documents/views.py
Outdated
# other errors | ||
except Exception: | ||
sys.stdout.flush() | ||
except Exception as e: |
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.
Recommendation from python: Use more verbose names for your variables for clarity. e
--> err
?
rero_ils/modules/documents/views.py
Outdated
'errors': { | ||
'code': status_code, | ||
'title': 'An unexpected error has been raise.', | ||
'detail': 'Error: {}'.format(e) |
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.
I prefer to use named format parameters:
'Error: {err}'.format(err=err)
rero_ils/modules/documents/views.py
Outdated
} | ||
return jsonify(response), 500 | ||
current_app.logger.error( | ||
'{}: {}'.format( |
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.
See above.
@@ -562,7 +562,7 @@ | |||
"title": "Authors", | |||
"description": "Author(s) of the resource. Can be either persons or organisations.", | |||
"type": "array", | |||
"minItems": 0, | |||
"minItems": 1, |
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.
See: #611
Your changes will be erased by a bootstrap
!
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.
This should not be addressed by this PR. It has been commited buy error.
* Fixes item types type validation. * Fixes validation message for patron phone number. * Adds opening hours to the library of the 3th organisation. * Fixes document detailed view for patrons with organisation without pickup locations. Closes: rero#598. * Fixes import document using EAN from the BNF server. Closes: rero#607. * Improves logs to BNF document importation. * Fixes logged user initial user menu. * Fixes reset password links in the user email when a librarian create a patron. Closes: rero#608. * Forces instance jinja templates to be loaded before all other templates. * Makes exception variable more explicit e -> error. Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
60f348a
to
33ab836
Compare
pickup locations. Closes: Render a document detailed view with document even if there's a library without pickup location in the organisation #598.
Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch
Why are you opening this PR?
Code review check list