mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-15 07:32:13 +00:00
fix: Create ssh_key failed
This commit is contained in:
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
Block a user