Fixed #30097 -- Made 'obj' arg of InlineModelAdmin.has_add_permission() optional.

Restored backwards compatibility after refs #27991.
Regression in be6ca89396.
This commit is contained in:
MaximZemskov 2019-01-11 13:13:31 +03:00 committed by Tim Graham
parent 8f4eee1777
commit 3c01fe30f3
4 changed files with 32 additions and 3 deletions

View file

@ -2413,7 +2413,9 @@ The ``InlineModelAdmin`` class adds or customizes:
.. versionchanged:: 2.1
The ``obj`` argument was added.
The ``obj`` argument was added. During the deprecation period, it may
also be ``None`` if third-party calls to ``has_add_permission()`` don't
provide it.
.. method:: InlineModelAdmin.has_change_permission(request, obj=None)

View file

@ -9,4 +9,6 @@ Django 2.1.6 several bugs in 2.1.5.
Bugfixes
========
* ...
* Made the ``obj`` argument of ``InlineModelAdmin.has_add_permission()``
optional to restore backwards compatibility with third-party code that
doesn't provide it (:ticket:`30097`).