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

Recipe Update Error #275

Closed
vabene1111 opened this issue Dec 20, 2020 · 2 comments
Closed

Recipe Update Error #275

vabene1111 opened this issue Dec 20, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@vabene1111
Copy link
Collaborator

500 error when editing some recipes
There was an error updating the recipe!{"steps":[{"ingredients":[{},{},{},{},{},{"unit":{"name":["This field may not be blank."]}},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{},{}]}]}

Probably related to import not populating some fields correctly

Originally posted by @edcous in #274

@vabene1111 vabene1111 added the bug Something isn't working label Dec 20, 2020
@vabene1111
Copy link
Collaborator Author

the issue is related to units or ingredients being objects with empty text when the importer does not populate these fields appropriatly

@vabene1111
Copy link
Collaborator Author

vabene1111 commented Dec 26, 2020

actually inserts a unit with an empty name into the db. What needs to be done:

  • fix the importer so that null is used instead of this "dead" unit
  • write migration to null out all ingredients that use these dead units (and possibly foods)
  • set database constraint to disallow empty names
  • test if everything still works and no old recipes are broken

@vabene1111 vabene1111 pinned this issue Dec 26, 2020
@vabene1111 vabene1111 unpinned this issue Dec 27, 2020
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
None yet
Development

No branches or pull requests

1 participant