Open leethobbit opened 1 month ago
I tried with this:
path('test/', Page(
parts=dict(
a=EditTable(auto__model=Department, columns__name__field__include=True),
b=EditTable(auto__model=DocumentCategory, columns__name__field__include=True),
c=EditTable(auto__model=Document, columns__name__field__include=True),
)
)),
which works, so it's not trivially reproducible at least.
Are you running the latest version of iommi?
Interesting. I tested with both 7.5.1 and 7.6.0 and encounter the situation in both versions. I've been using classes to define my index Pages, which is where the trouble shows up.
Additionally, it seems there are more inconsistencies here than I noticed previously. One of my apps in this project is behaving as expected. So, I need to investigate further on my end.
Issue: When using multiple EditTables on a page, and when the order of the EditTables is different from the order that the models appear in the models.py file, the Save feature of the 2nd table seems to break and no longer submit new rows.
In my example, I have models for Role and Person at a business. The Role model appears before the Person model in the models.py.
Code in use: models.py
views.py
urls.py
If I place them on a Page with the Role EditTable first, things work as expected. If I flip them, the Role EditTable (which now appears second) will no longer save new rows. I was able to replicate this with multiple other models from different apps in my project so it seems consistent across the board.
Hope I have provided enough details to narrow down the issue. If I discover more I'll add to this post.