#29440: RelatedManager.set() doesn't accept bulk keyword argument for 
many-to-many
relations
-------------------------------------+-------------------------------------
               Reporter:  Jeremy     |          Owner:  nobody
  Lainé                              |
                   Type:  Bug        |         Status:  new
              Component:  Database   |        Version:  2.0
  layer (models, ORM)                |
               Severity:  Normal     |       Keywords:
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 Since Django 2.0, trying to pass bulk=True to a many-to-many
 RelatedManager results in an error:

 ```TypeError: set() got an unexpected keyword argument 'bulk'```

 The documentation however still states that the "bulk" argument exists, so
 I'm not sure whether the documentation or the code is wrong.

 Looking at the django code, the set() method for reverse many-to-one, and
 forward many-to-many relations don't have the same signature.

 In `create_reverse_many_to_one_manager`:

 ```def set(self, objs, *, bulk=True, clear=False):```

 In `create_forward_many_to_many_manager`:

 ```def set(self, objs, *, clear=False)```

-- 
Ticket URL: <https://code.djangoproject.com/ticket/29440>
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 post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/049.1cf7ea3482649d267907b66ce136a862%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to