-
Notifications
You must be signed in to change notification settings - Fork 45
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
Error when trying to change the name of a meal #843
Comments
The easy work around to this was to delete the Component and recreate it with the new name. Annoying but efficient. |
Django has an arbitrary limit on fields than can be submitted through a form. It can be increased. I am surprised though, because the limit is pretty high by default I believe. @JeanFrancoisFournier How many ingredients in the meal you try to submit ? |
I think it has to do with the fact that during the CM process, every time we confirm the ingredients for the recipe of the day, a menu_component listing the ingredients used for that day. It also adds these ingredients in the component (dishes and recipes) with a mention that these ingredients were used on that date. See image below. As the year progresses, we may serve a recipe 12 times or more with 12 to 20 different ingredients. This means that the component (dishes and recipe) becomes longer and longer. I think that's why we reached Django's limit on recipes that are served often and are ingredients heavy. |
and to answer your questions there is (as of today and until we serve the vegetable lasagna again) 251 ingredients listed in the recipe. Of these, only 7 are used to load the recipe in the UI and all the others were created by the application. |
OK JF, I understand. So there is no point in increasing the limit of fields, except as a temporary bandaid, we'd better fix the underlying problem. In my mind, the problem occurs because we try to use the same concept (`Component) to serve two different purposes:
Any suggestions on how to fix that ? Couple of questions for you:
|
Expected Behaviour
Through the Admin, We should be able to change name of any ingredients, components (dishes&recipes) and restricted items (restriction categories).
Actual Behaviour
When trying to rename one, we got this error message:
The text was updated successfully, but these errors were encountered: