mirror of
https://github.com/django/django.git
synced 2025-04-05 05:56:42 +00:00
Cleaned up UserAdmin.get_form() that worked around a bug fixed in 23e1b59.
Refs #18681.
This commit is contained in:
parent
a3e7d73ed7
commit
3a00229189
@ -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)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user