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

selfcheck: fix patron informations #2248

Merged
merged 1 commit into from
Jul 28, 2021
Merged

Conversation

jma
Copy link
Contributor

@jma jma commented Jul 27, 2021

  • Sets institution_id to the patron organisation pid.
  • Rounds the fees to cents.
  • Fixes patron language, email, phone.
  • Removes CR chars \n, \r from the patron address.
  • Adds the due_date in a checkout response even if the item has been
    already checked out.

Co-Authored-by: Johnny Mariéthoz [email protected]
Co-Authored-by: Igor Milhit [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 iGormilhit, sebdeleze and lauren-d July 27, 2021 14:28
@jma jma self-assigned this Jul 27, 2021
@jma jma added the bug Breaks something but is not blocking label Jul 27, 2021
@github-actions github-actions bot added the f: circulation Concerns the circulation interface or backend label Jul 27, 2021
@jma jma added this to the v1.5.0 milestone Jul 27, 2021
@@ -48,6 +48,7 @@ def selfcheck_login(name, access_token, **kwargs):
"""
terminal = SelfcheckTerminal.find_terminal(name=name)
user = authorize_selfckeck_terminal(terminal, access_token, **kwargs)
print('user', user)

Choose a reason for hiding this comment

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

This line should be removed!

Comment on lines 98 to 103
# Should never append, but can be imported from an old system
formated_address = formated_address.replace(r'\n', ' ')
formated_address = formated_address.replace(r'\r', ' ')
formated_address = formated_address.replace('\n', ' ')
formated_address = formated_address.replace('\r', ' ')
return formated_address

Choose a reason for hiding this comment

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

You can chain these statements

Copy link
Contributor

@lauren-d lauren-d left a comment

Choose a reason for hiding this comment

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

Please check the commit message.
No more comments

@jma jma force-pushed the maj-fix-medvs-selfcheck branch 2 times, most recently from ce6f828 to 1e2fcf4 Compare July 28, 2021 15:05
* Sets `institution_id` to the patron organisation `pid`.
* Rounds the fees to cents.
* Fixes patron language, email, phone.
* Removes CR chars `\n`, `\r` from the patron address.
* Adds the `due_date` in a checkout response even if the item has been
  already checked out.

Co-Authored-by: Johnny Mariéthoz <[email protected]>
Co-Authored-by: Igor Milhit <[email protected]>
@jma jma force-pushed the maj-fix-medvs-selfcheck branch from 1e2fcf4 to 23be33c Compare July 28, 2021 15:28
@jma jma requested a review from sebdeleze July 28, 2021 15:47
@jma jma merged commit b80b7a8 into rero:dev Jul 28, 2021
@jma jma deleted the maj-fix-medvs-selfcheck branch January 13, 2022 14:48
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: circulation Concerns the circulation interface or backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants