Skip to content
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

Merged
merged 1 commit into from
Nov 11, 2019
Merged

Conversation

jma
Copy link
Contributor

@jma jma commented Nov 7, 2019

Co-Authored-by: Johnny Mariéthoz Johnny.Mariethoz@rero.ch

Why are you opening this PR?

  • First workshop failed.

Code review check list

  • Commit message template compliance.
  • Commit message without typos.
  • File names.
  • Functions names.
  • Functions docstrings.
  • Unnecessary commited files?

@jma jma requested review from iGormilhit, mmo and pronguen November 7, 2019 10:41
@jma jma force-pushed the maj-workshop-fixes branch 6 times, most recently from f0413a3 to fd8d498 Compare November 8, 2019 14:33
@rerowep rerowep self-requested a review November 8, 2019 15:03
@jma jma force-pushed the maj-workshop-fixes branch from fd8d498 to 60f348a Compare November 8, 2019 16:12
# other errors
except Exception:
sys.stdout.flush()
except Exception as e:
Copy link
Contributor

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 ?

'errors': {
'code': status_code,
'title': 'An unexpected error has been raise.',
'detail': 'Error: {}'.format(e)
Copy link
Contributor

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)

}
return jsonify(response), 500
current_app.logger.error(
'{}: {}'.format(
Copy link
Contributor

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,
Copy link
Contributor

@rerowep rerowep Nov 9, 2019

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!

Copy link
Contributor Author

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>
@iGormilhit iGormilhit merged commit 27c20bd into rero:workshop Nov 11, 2019
@jma jma deleted the maj-workshop-fixes branch December 11, 2019 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants