Commit 947f7d20 authored by ibuler's avatar ibuler

[Bugfix] 修复生成system user的问题

parent 035dd16b
...@@ -106,7 +106,7 @@ class AssetUser(models.Model): ...@@ -106,7 +106,7 @@ class AssetUser(models.Model):
def auto_gen_auth(self): def auto_gen_auth(self):
password = str(uuid.uuid4()) password = str(uuid.uuid4())
private_key, public_key = ssh_key_gen( private_key, public_key = ssh_key_gen(
username=self.name, password=password username=self.username, password=password
) )
self.set_auth(password=password, self.set_auth(password=password,
private_key=private_key, private_key=private_key,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment