0
0
mirror of https://github.com/django/django.git synced 2024-12-01 15:42:04 +01:00

Fixed arguments for get_inline_instances example; refs #17856

This commit is contained in:
Tim Graham 2012-10-20 09:57:15 -04:00
parent cfb3eb2e3d
commit 300d052713

View File

@ -1148,7 +1148,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, obj):
# hide MyInline in the add view
if isinstance(inline, MyInline) and obj is None:
continue