fix: 修复推送动态用户 comment 中包含空格导致推送失败的问题

pull/8373/head
Jiangjie.Bai 2 years ago committed by Jiangjie.Bai
parent 9d1e94d3c2
commit 3755f8f33a

@ -33,16 +33,17 @@ def _dump_args(args: dict):
def get_push_unixlike_system_user_tasks(system_user, username=None, **kwargs):
comment = system_user.name
algorithm = kwargs.get('algorithm')
if username is None:
username = system_user.username
comment = system_user.name
if system_user.username_same_with_user:
from users.models import User
user = User.objects.filter(username=username).only('name', 'username').first()
if user:
comment = f'{system_user.name}[{str(user)}]'
comment = comment.replace(' ', '')
password = system_user.password
public_key = system_user.public_key

Loading…
Cancel
Save