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

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

Backport of a44a21a22f from master
This commit is contained in:
Tobias Kunze
2019-04-17 13:37:56 +02:00
committed by Mariusz Felisiak
parent bf9e0e342d
commit 769f87fd24
2 changed files with 13 additions and 1 deletions

View File

@@ -1097,7 +1097,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