From 3a0022918989edfcb8d73f484b1b900935300abe Mon Sep 17 00:00:00 2001 From: Loic Bistuer Date: Thu, 18 Jul 2013 23:59:45 +0700 Subject: [PATCH] Cleaned up UserAdmin.get_form() that worked around a bug fixed in 23e1b59. Refs #18681. --- django/contrib/auth/admin.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/django/contrib/auth/admin.py b/django/contrib/auth/admin.py index 5a1db68613..ca660606e5 100644 --- a/django/contrib/auth/admin.py +++ b/django/contrib/auth/admin.py @@ -70,10 +70,7 @@ class UserAdmin(admin.ModelAdmin): """ defaults = {} if obj is None: - defaults.update({ - 'form': self.add_form, - 'fields': admin.util.flatten_fieldsets(self.add_fieldsets), - }) + defaults['form'] = self.add_form defaults.update(kwargs) return super(UserAdmin, self).get_form(request, obj, **defaults)