mirror of
https://github.com/django/django.git
synced 2025-04-20 15:24:35 +00:00
[1.4.x] Fixed arguments for get_inline_instances; refs #17006.
This commit is contained in:
parent
e7685b87c1
commit
13bbe9161d
@ -1159,7 +1159,7 @@ templates used by the :class:`ModelAdmin` views:
|
||||
inlines = [MyInline, SomeOtherInline]
|
||||
|
||||
def get_formsets(self, request, obj=None):
|
||||
for inline in self.get_inline_instances():
|
||||
for inline in self.get_inline_instances(request):
|
||||
# hide MyInline in the add view
|
||||
if isinstance(inline, MyInline) and obj is None:
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user