#18823: Clear with a M2M field with a through model -------------------------------------+------------------------------------- Reporter: anonymous | Owner: nobody Type: Bug | Status: closed Component: Database layer | Version: 1.4 (models, ORM) | Resolution: fixed 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 Anssi Kääriäinen <akaariai@…>): In [changeset:"f105fbe52b21da206bfbaedf0e92326667d7b2d4"]: {{{ #!CommitTicketReference repository="" revision="f105fbe52b21da206bfbaedf0e92326667d7b2d4" [1.5.x] Fixed #18823 -- Ensured m2m.clear() works when using through+to_field There was a potential data-loss issue involved -- when clearing instance's m2m assignments it was possible some other instance's m2m data was deleted instead. This commit also improved None handling for to_field cases. Backpatch of 611c4d6f1c24763e5e6e331a5dcf9b610288aaa8 }}} -- Ticket URL: <https://code.djangoproject.com/ticket/18823#comment:12> 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.