integreat-cms
integreat-cms copied to clipboard
Cannot update a sent push notification sometimes
Describe the Bug
Sometimes an error message shows up that a required field is not set, even though the mode is set to fallback to default language:
Steps to Reproduce
- Create a push notification in a region that has a root language which has an id that is bigger than the id of another language of that region
- send it
- try to update it
- notice the error
Expected Behavior
The pn can be updated normally
Actual Behavior
The pn cannot be updated
Additional Information
The problem seems to be that the code assumes that the default language of the region is the first language of the formset, while the actual first language of the formset is the language with the smallest id