1
0
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:
Tim Graham 2012-10-20 09:57:51 -04:00
parent e7685b87c1
commit 13bbe9161d

View File

@ -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