jazzband / django-polymorphic

Improved Django model inheritance with automatic downcasting
https://django-polymorphic.readthedocs.io
Other
1.66k stars 280 forks source link

Admin: add view popup breaks if initial submit has validation error #612

Open pannkotsky opened 4 months ago

pannkotsky commented 4 months ago

Scenario:

Expected:

Actual:

This happens because after initial submit with validation error the query params indicating popup are removed, and only ct_id param is preserved. It comes from the following lines of code: https://github.com/jazzband/django-polymorphic/blob/master/polymorphic/admin/parentadmin.py#L202-L208