admin: force is_locked() to False in UserChangeForm (#42694)
Locked fields are implemented by renaming the form's fields with a `@disabled' suffix. But it interacts badly with the Django admin framework which expects all fields to always exist. The simplest fix for that is to disable field locking in the admin views on User.
This commit is contained in:
parent
a3bf1cf609
commit
a35be9f28d
|
@ -224,6 +224,9 @@ class UserChangeForm(BaseUserForm):
|
|||
code='missing_credential',
|
||||
)
|
||||
|
||||
def is_field_locked(self, name):
|
||||
return False
|
||||
|
||||
|
||||
class UserCreationForm(BaseUserForm):
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue