Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@jma
Copy link
Contributor

@jma jma commented Mar 10, 2022

  • Fixes patron information REST view crash when the patron type code is
    not present.
  • Protects the patron information using the oauth permision.

Co-Authored-by: Johnny Mariéthoz [email protected]

Why are you opening this PR?

  • Which task/US does it implement?
  • Which issue does it fix?

Dependencies

My PR depends on the following rero-ils-ui's PR(s):

  • rero/rero-ils-ui#

How to test?

  • What command should I have to run to test your PR?
  • What should I test through the UI?

Code review check list

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

@jma jma requested review from lauren-d and rerowep March 10, 2022 14:42
@jma jma force-pushed the maj-fix-oauth-patron-info branch from c1e3e76 to f0d623d Compare March 10, 2022 14:47
data['patron_types'] = patron_types
info = {}
if patron.get('patron', {}).get('type', {}).get('code'):
info['patron_type'] = patron['patron']['type']['code']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some times I prefer to write:

patron_type = patron.get('patron', {}).get('type', {}).get('code')
if patron_type:
    info['patron_type'] = patron_type

One line more but more understandable.

@PascalRepond PascalRepond added the bug Breaks something but is not blocking label Mar 11, 2022
@jma jma force-pushed the maj-fix-oauth-patron-info branch from f0d623d to 74bcc36 Compare March 14, 2022 08:50
* Fixes patron information REST view crash when the patron type code is
  not present.
* Protects the patron information using the oauth permision.

Co-Authored-by: Johnny Mariéthoz <[email protected]>
@jma jma force-pushed the maj-fix-oauth-patron-info branch from 74bcc36 to 953006e Compare March 14, 2022 08:54
@jma jma requested review from Garfield-fr and rerowep March 14, 2022 08:55
@jma jma merged commit 944650a into rero:staging Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Breaks something but is not blocking f: user management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants