#31098: has_add_permission() takes 2 positional arguments but 3 were given.
-------------------------------------+-------------------------------------
Reporter: Mihai Zamfir | Owner: nobody
Type: Bug | Status: closed
Component: contrib.admin | Version: 3.0
Severity: Normal | Resolution: invalid
Keywords: admin inlines | Triage Stage:
permission | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by felixxm):
Replying to [comment:5 Mihai Zamfir]:
> Thanks for the response. However, that's not something I can control. As
in the snippet above, I'm just calling the parent method, the super call
errors.
>
> {{{
> def get_inline_instances(self, request, obj=None):
> inline_instances = super().get_inline_instances(request, obj)
> }}}
Of course you can, your class that inherits from `ModelAdmin` has inlines
with a custom `has_add_permission()` method that doesn't accept `obj`
argument. Please use one of
[https://code.djangoproject.com/wiki/TicketClosingReasons/UseSupportChannels
support channels].
--
Ticket URL: <https://code.djangoproject.com/ticket/31098#comment:6>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.d0275020e80dbda598204efd0fd7b6a1%40djangoproject.com.