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

record: User resource creation #72

Merged
merged 1 commit into from
Oct 9, 2019
Merged

record: User resource creation #72

merged 1 commit into from
Oct 9, 2019

Conversation

sebdeleze
Copy link
Contributor

@sebdeleze sebdeleze commented Aug 19, 2019

  • NEW Add user resource.
  • NEW Link institution to user resource.
  • NEW Link user account to user resource with account ID.

Signed-off-by: Sébastien Délèze [email protected]

@sebdeleze sebdeleze marked this pull request as ready for review August 27, 2019 05:53
@sebdeleze sebdeleze changed the title record: Patron resource creation record: User resource creation Sep 27, 2019
@sebdeleze sebdeleze requested a review from jma September 27, 2019 08:30
sonar/config.py Show resolved Hide resolved
@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
Copy link
Contributor

Choose a reason for hiding this comment

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

do you really need this extension?

},
"last_name": {
"title": "Last name",
"validationMessage": "Last Name is required.",
Copy link
Contributor

Choose a reason for hiding this comment

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

validationMessage is not a json schema properties as I know. This should be in the form option. (Same for the entire file.)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll remove these entries. For information, validationMessage entry exists in json schemas in RERO ILS, too : https://github.com/rero/rero-ils/search?p=1&q=validationMessage&unscoped_q=validationMessage

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you check with the rero-ils team? Thanks.

"type": "array",
"uniqueItems": true,
"minItems": 1,
"maxItems": 3,
Copy link
Contributor

Choose a reason for hiding this comment

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

3 or 4?

})

record.reindex()
record.reindex(True)
Copy link
Contributor

Choose a reason for hiding this comment

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

nothing is really tested here except that the code does not produce error.

@sebdeleze sebdeleze requested a review from jma October 3, 2019 09:42
pid = PersistentIdentifier()
last_name = SanitizedUnicode(required=True)
first_name = SanitizedUnicode(required=True)
email = SanitizedUnicode(required=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Some other properties exists such as institution, etc. No?

record.reindex()

# Wait for indexing
time.sleep(1)
Copy link
Contributor

Choose a reason for hiding this comment

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

you can force to flush the index instead. Please check the rero-ils Patron indexer for example. Sleep is not safe.

* NEW Add user resource.
* NEW Link institution to user resource.
* NEW Link user account to user resource with account ID.
* BETTER Remove "validationMessage" entries from json schemas.

Signed-off-by: Sébastien Délèze <[email protected]>
@sebdeleze sebdeleze requested a review from jma October 8, 2019 13:18
@sebdeleze sebdeleze merged commit ac85643 into rero:master Oct 9, 2019
@sebdeleze sebdeleze deleted the sed-patrons branch October 9, 2019 08:15
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.

2 participants