mirror of https://github.com/jumpserver/jumpserver
fix: Create ssh_key failed
parent
50faa3242a
commit
e802e145af
|
@ -137,8 +137,8 @@ class AuthMixin:
|
||||||
if self.can_update_ssh_key():
|
if self.can_update_ssh_key():
|
||||||
from authentication.models import SSHKey
|
from authentication.models import SSHKey
|
||||||
SSHKey.objects.create(
|
SSHKey.objects.create(
|
||||||
public_key=public_key, private_key=private_key, user=self, name=kwargs.get('name'),
|
public_key=public_key, private_key=private_key, user=self, name=kwargs.get('name', ''),
|
||||||
comment=kwargs.get('comment'), is_active=kwargs.get('is_active')
|
comment=kwargs.get('comment', ''), is_active=kwargs.get('is_active')
|
||||||
)
|
)
|
||||||
post_user_change_password.send(self.__class__, user=self)
|
post_user_change_password.send(self.__class__, user=self)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue