Merge pull request #1372 from loic/admin
Cleaned up UserAdmin.get_form() that worked around a bug fixed in 23e1b59
.
This commit is contained in:
commit
9a2715da8b
|
@ -70,10 +70,7 @@ class UserAdmin(admin.ModelAdmin):
|
||||||
"""
|
"""
|
||||||
defaults = {}
|
defaults = {}
|
||||||
if obj is None:
|
if obj is None:
|
||||||
defaults.update({
|
defaults['form'] = self.add_form
|
||||||
'form': self.add_form,
|
|
||||||
'fields': admin.util.flatten_fieldsets(self.add_fieldsets),
|
|
||||||
})
|
|
||||||
defaults.update(kwargs)
|
defaults.update(kwargs)
|
||||||
return super(UserAdmin, self).get_form(request, obj, **defaults)
|
return super(UserAdmin, self).get_form(request, obj, **defaults)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue