添加一个资产,然后推送系统用户时出现(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:
Eli
2017-07-10 11:01:20 +08:00
committed by 老广
parent 235cbe12ee
commit 370cdc275a
4 changed files with 5 additions and 5 deletions

View File

@@ -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)