Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from csomme/manager-add-kwargs
Browse files Browse the repository at this point in the history
include **kwargs in add() signature
  • Loading branch information
dtao authored Aug 3, 2016
2 parents 2596dbd + 0bf2cd0 commit 50a43d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions django/db/models/fields/related.py
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ def get_prefetch_queryset(self, instances, queryset=None):
cache_name = rel_field.related_query_name()
return queryset, rel_obj_attr, instance_attr, False, cache_name

def add(self, *objs):
def add(self, *objs, **kwargs):
objs = list(objs)
db = router.db_for_write(self.model, instance=self.instance)
with transaction.commit_on_success_unless_managed(
Expand Down Expand Up @@ -914,7 +914,7 @@ def get_prefetch_queryset(self, instances, queryset=None):
False,
self.prefetch_cache_name)

def add(self, *objs):
def add(self, *objs, **kwargs):
if not rel.through._meta.auto_created:
opts = self.through._meta
raise AttributeError(
Expand Down

0 comments on commit 50a43d9

Please sign in to comment.