#35974: Use router.allow_relation in RelatedManager.add and
GenericRelatedObjectManager.add
-------------------------------------+-------------------------------------
     Reporter:  Laurent Szyster      |                    Owner:  (none)
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  4.2
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Sarah Boyce):

 * cc: Tim Graham (added)
 * stage:  Unreviewed => Accepted
 * summary:
     create_reverse_many_to_one_manager: use router.allow_relation instead
     of comparing objects' _state.db in RelatedManager.add
     =>
     Use router.allow_relation in RelatedManager.add and
     GenericRelatedObjectManager.add

Comment:

 Thank you for the report Laurent
 Been looking into it and this is also the case for
 `GenericRelatedObjectManager` and I think the logic was added in #18556
 (see also this [https://code.djangoproject.com/ticket/18556#comment:8
 comment]).
 This is not something I am very familiar with but what you're saying
 sounds reasonable and I would be happy to see a patch with tests -
 tentatively accepting
-- 
Ticket URL: <https://code.djangoproject.com/ticket/35974#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 [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/django-updates/010701939b1f5c64-1461efb0-e96d-453a-a642-62f4b7daca04-000000%40eu-central-1.amazonses.com.

Reply via email to