summaryrefslogtreecommitdiff
path: root/django/contrib/admin
diff options
context:
space:
mode:
Diffstat (limited to 'django/contrib/admin')
-rw-r--r--django/contrib/admin/options.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index bcf2a191fe..c6f42d658e 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -2127,7 +2127,8 @@ class InlineModelAdmin(BaseModelAdmin):
queryset = queryset.none()
return queryset
- def has_add_permission(self, request, obj):
+ def has_add_permission(self, request, obj=None):
+ # RemovedInDjango31Warning: obj becomes a mandatory argument.
if self.opts.auto_created:
# We're checking the rights to an auto-created intermediate model,
# which doesn't have its own individual permissions. The user needs