mirror of https://github.com/jumpserver/jumpserver
parent
fb1978a40b
commit
e34fbce082
|
@ -57,6 +57,8 @@ class AccountCreateUpdateSerializerMixin(serializers.Serializer):
|
|||
|
||||
def set_uniq_name_if_need(self, initial_data, asset):
|
||||
name = initial_data.get('name')
|
||||
if name is None:
|
||||
return
|
||||
if not name:
|
||||
name = initial_data.get('username')
|
||||
if self.instance and self.instance.name == name:
|
||||
|
|
Loading…
Reference in New Issue