mirror of https://github.com/jumpserver/jumpserver
[Bugfix] for some commit
parent
0c80e3e815
commit
6fae4d5dee
|
@ -16,13 +16,11 @@ class AuthSerializer(serializers.ModelSerializer):
|
|||
return private_key, public_key
|
||||
|
||||
def save(self, **kwargs):
|
||||
password = self.validated_data.pop('password') or None
|
||||
private_key = self.validated_data.pop('private_key') or None
|
||||
password = self.validated_data.pop('password', None) or None
|
||||
private_key = self.validated_data.pop('private_key', None) or None
|
||||
self.instance = super().save(**kwargs)
|
||||
if password or private_key:
|
||||
private_key, public_key = self.gen_keys(private_key, password)
|
||||
self.instance.set_auth(password=password, private_key=private_key,
|
||||
public_key=public_key)
|
||||
return self.instance
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue