mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-28 08:06:27 +00:00
添加一个资产,然后推送系统用户时出现(Asset实例无法序列化) (#477)
* error while push systemuser. error while create assets with adminuser(ssh key)
* fix errors in case of config.py dose not exist.
* change sign_t return from bytes to str. (#480)
* fix id_dsa check error (#458)
* fix id_dsa check error
* fix 邮件修改密码 token错误
* fix 3c8aec9
add )
* Dockerfile 优化 (#453)
This commit is contained in:
@@ -81,7 +81,7 @@ class AdminUser(models.Model):
|
||||
return None
|
||||
project_dir = settings.PROJECT_DIR
|
||||
tmp_dir = os.path.join(project_dir, 'tmp')
|
||||
key_name = md5(self._private_key).hexdigest()
|
||||
key_name = md5(self._private_key.encode()).hexdigest()
|
||||
key_path = os.path.join(tmp_dir, key_name)
|
||||
if not os.path.exists(key_path):
|
||||
self.private_key.write_private_key_file(key_path)
|
||||
|
Reference in New Issue
Block a user