#18823: Clear with a M2M field with a through model -------------------------------------+------------------------------------- Reporter: anonymous | Owner: nobody Type: Bug | Status: new Component: Database layer | Version: 1.4 (models, ORM) | Resolution: Severity: Release blocker | Triage Stage: Accepted Keywords: | Needs documentation: 0 Has patch: 1 | Patch needs improvement: 0 Needs tests: 0 | UI/UX: 0 Easy pickings: 0 | -------------------------------------+-------------------------------------
Comment (by anonymous): Here's patch meant to be applied on top of https://github.com/akaariai/django/tree/ticket_18823. It tests _add_items and _remove_items instead of add and remove. Hand coding the right fields in the right order seems a little fragile. I thought about using manager.source_field_name and manager.target_field_name in the tests, but didn't because that is undocumented api. Although so is _add_items and _remove_items. I guess i'm just really not sure when it is ok to use undocumented api in tests and when it isn't. Let me know what you think -- Ticket URL: <https://code.djangoproject.com/ticket/18823#comment:10> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.