#20702: Using ModelAdmin.get_formsets() to filter inlines is broken. -------------------------------------+------------------------------------- Reporter: stanislas.guerra@… | Owner: Type: Bug | CodenameTim Component: contrib.admin | Status: assigned Severity: Normal | Version: 1.4 Keywords: admin inlines | Resolution: get_formsets | Triage Stage: Accepted Has patch: 1 | Needs documentation: 0 Needs tests: 1 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by CodenameTim):
* owner: nobody => CodenameTim * status: new => assigned * has_patch: 0 => 1 * needs_tests: 0 => 1 Comment: I've created a patch that changes the ModelAdmin's get_formsets to return a tuple of the formset and the inline. This allows us to move away from using the zip function and avoids the problem of get_formsets not returning an inline that was including in the inlines property. Patch: [https://github.com/tim- schilling/django/commit/ea7c7dc856fd773d74214099f646f8c4e2c7f2f3] If this looks good, I'll add some additional unit tests around the changes in functionality (marking Needs tests so we don't forget). I did add the test that verified the bug in modeladmin.ModelAdminTests -- Ticket URL: <https://code.djangoproject.com/ticket/20702#comment:2> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/084.000e547c76c8ab6261c3c5a9c7ca134d%40djangoproject.com?hl=en. For more options, visit https://groups.google.com/groups/opt_out.