1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

Fixed #26678 -- Doc'd that RelatedManager.add()/remove()/set() accepts the field the relation points to.

This commit is contained in:
Tobias Kunze
2019-04-17 13:37:56 +02:00
committed by Mariusz Felisiak
parent 8eb4133714
commit a44a21a22f
2 changed files with 13 additions and 1 deletions

View File

@@ -1148,7 +1148,8 @@ def create_forward_many_to_many_manager(superclass, rel, reverse):
def _remove_items(self, source_field_name, target_field_name, *objs):
# source_field_name: the PK colname in join table for the source object
# target_field_name: the PK colname in join table for the target object
# *objs - objects to remove
# *objs - objects to remove. Either object instances, or primary
# keys of object instances.
if not objs:
return