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)