mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-24 21:08:30 +00:00
perf: account cannot be modified (#9585)
Co-authored-by: feng <1304903146@qq.com>
This commit is contained in:
@@ -52,6 +52,8 @@ class AccountSerializerCreateValidateMixin:
|
||||
return instance
|
||||
|
||||
def update(self, instance, validated_data):
|
||||
# account cannot be modified
|
||||
validated_data.pop('username', None)
|
||||
push_now = validated_data.pop('push_now', None)
|
||||
instance = super().update(instance, validated_data)
|
||||
self.push_account(instance, push_now)
|
||||
|
Reference in New Issue
Block a user