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

custom fields: error is not displayed after saving a few times #582

Open
jrcastro2 opened this issue Sep 29, 2022 · 1 comment
Open

custom fields: error is not displayed after saving a few times #582

jrcastro2 opened this issue Sep 29, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@jrcastro2
Copy link
Contributor

Package version (if known):

Describe the bug

When introducing a wrong value in one of the custom fields, after the first save, the error is displayed but after saving it again it the error will disappear, although the value is still incorrect in the form

Steps to Reproduce

  1. Go to 'New upload'
  2. Fill in required fields
  3. Fill in one of the custom fields with a invalid value
  4. Save
  5. Modify any other field except for the custom field with the wrong value
  6. Save
  7. Save again
  8. Error disappeared

Expected behavior

Error should be displayed as long as the value is wrong in the form.

@jrcastro2 jrcastro2 added the bug Something isn't working label Sep 29, 2022
@zzacharo zzacharo self-assigned this Sep 29, 2022
@ppanero
Copy link
Member

ppanero commented Sep 30, 2022

There are two possible solutions:

  • Frontend: Keep the current state in redux, then do a merge between the current content and the one returned by the REST API.
  • Backend: Save invalid data in drafts so it is a rest api driven implementation (personally, I prefer this option).
    That will require a merge between what is produced by the marshmallow schema and the input data.

@ppanero ppanero added this to Triage in InvenioRDM QA via automation Sep 30, 2022
@zzacharo zzacharo removed their assignment Oct 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

3 participants