﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
29310	ManyRelatedManager.add() does not accept `bulk` kwarg as described in documentation	Brenton Partridge	nobody	"https://docs.djangoproject.com/en/2.0/ref/models/relations/#django.db.models.fields.related.RelatedManager.add suggests that `RelatedManager.add(*objs, bulk=True)` accepts the `bulk` kwarg regardless of the type of relationship. However, for many-to-many relationships, https://github.com/django/django/blob/2919a08c20d5ae48e381d6bd251d3b0d400d47d9/django/db/models/fields/related_descriptors.py#L909 does not accept any kwargs. (Master branch as of the submission of this ticket.)

This leads to errors like `add() got an unexpected keyword argument ‘bulk’`.

This could be fixed in documentation, since for many-to-many the inserts are going to be bulk regardless. But then RelatedManager wouldn't have a consistent interface across all types of relations. Alternately, we could just add the kwarg to the code and ignore it, and document more clearly that ""all many-to-many adds are inserted in bulk, regardless of the choice of bulk kwarg."" But we shouldn't just error out on a developer who attempts to follow the documentation.

Any thoughts?"	Bug	closed	Documentation	dev	Normal	duplicate	documentation, orm		Unreviewed	0	0	0	0	0	0
