I have a CondensedInlinePanel in my page model that contains two select inputs. They save just fine on page creation, but if I go to edit the page, all unmodified panels will throw validation errors on those input fields.
In this screenshot, I just tried to add "Edited Panel" to an existing page ("The page could not be saved due to validation errors."):
Here are the fields that are throwing errors ("Select a valid choice. [''] is not one of the available choices."). Note that all of the selected options are* valid choices:
The Workaround:
Currently I can prevent the validation errors from occurring by manually opening each panel so the plugin marks them as "modified". Since we're using JQuery on our site I added this code to do the same thing automatically on page load. Obviously this isn't ideal, but it does work well enough for our purposes:
Version Info
Wagtail: 2.5.1 Django: 2.0 Python: 3.4 & 3.6 (Two different environments) CondensedInlinePanel: 0.5.2
The Issue:
I have a CondensedInlinePanel in my page model that contains two select inputs. They save just fine on page creation, but if I go to edit the page, all unmodified panels will throw validation errors on those input fields.
In this screenshot, I just tried to add "Edited Panel" to an existing page ("The page could not be saved due to validation errors."):
Here are the fields that are throwing errors ("Select a valid choice. [''] is not one of the available choices."). Note that all of the selected options are* valid choices:
The Workaround:
Currently I can prevent the validation errors from occurring by manually opening each panel so the plugin marks them as "modified". Since we're using JQuery on our site I added this code to do the same thing automatically on page load. Obviously this isn't ideal, but it does work well enough for our purposes:
Relevant model code