Sender | Message | Time |
---|---|---|
26 Dec 2020 | ||
lynn left the room. | 11:44:36 | |
kimshiland left the room. | 23:47:49 | |
27 Dec 2020 | ||
desmond left the room. | 11:42:09 | |
cyril | 17:42:55 | |
cyril left the room. | 18:23:58 | |
28 Dec 2020 | ||
leandro | 11:15:11 | |
leandro left the room. | 11:56:42 | |
ringo left the room. | 12:58:55 | |
scott left the room. | 20:50:20 | |
paul left the room. | 21:43:34 | |
10 Jan 2021 | ||
jojo joined the room. | 10:06:00 | |
jojo | Hi, I have an issue with "Validation Errors" with nested Orderable models. Best described with a picture at first: | 10:10:06 |
jojo | Download Screen Shot 2021-01-10 at 10.53.49.png | 10:10:19 |
jojo | I have a page type called "CoursePage" - on this Page multiple Orderables "CourseDates" can be added - furthermore each CourseDate can have one or more "CourseTimes". Relation is made via using ParentalKey. | 10:12:35 |
jojo | The CoursePage has this content panel:
| 10:14:01 |
jojo | * The CoursePage has this Miltufield content panel:
| 10:14:13 |
jojo | This is the CourseDates model
| 10:14:48 |
jojo | And finally the CourseTimes model:
| 10:15:29 |
jojo | * And finally the CourseTimes model:
| 10:16:29 |
jojo | * The CoursePage has this Multifield content panel:
| 10:17:07 |
jojo | I can successfully add multiple CourseDates to a CoursePage | 10:18:19 |
jojo | Then save and afterwards add a CourseTime to this Date | 10:19:05 |
jojo | But whenever I choose to add a CourseDate AND addtitionally at the same time add a CourseTime, and then click save draft or publish, I get the following Validation Errors: | 10:23:02 |
jojo | Download Screen Shot 2021-01-10 at 11.22.22.png | 10:23:08 |
jojo | Download Screen Shot 2021-01-10 at 11.23.16.png | 10:23:32 |
jojo | Obviously the CourseDate is saved properly but the CourseTime is not | 10:24:00 |
jojo | I had a look in the database to understand the relations between the tables better and my vague guess is that wagtail tries to save the CourseDates and CourseTimes at the same time. This can't work because the CourseDates entry/primary key has to exist prior to adding a related CourseDate in the coursedates table. | 10:26:24 |
jojo | Is anyone still with me and would like to kindly point me in the right direction? Long story short: How would I advise wagtail admin panel to save the data in the correct order: First save to the CourseDates table - and only THEN save to the CourseTimes table. | 10:27:51 |
jojo | Thanks in advance for any hints how to solve this! :-) | 10:28:06 |
12 Jan 2021 | ||
jojo | Not much going on in this room. Just if anyone is read my issue here anyway I now took the time to file a stackoverflow question. If you are interested please go ahead and answer there: https://stackoverflow.com/questions/65680004/nested-orderables-validation-errors | 08:09:27 |