fix: 修复迁移数据库应用账号缺少的问题

This commit is contained in:
Bai
2023-02-16 14:58:42 +08:00
committed by Jiangjie.Bai
parent b8c872c68e
commit bfa2e285f5
2 changed files with 7 additions and 1 deletions

View File

@@ -77,6 +77,11 @@ class CommandStorage(CommonStorageModelMixin, JMSBaseModel):
def config(self):
config = self.meta
config.update({'TYPE': self.type})
# 处理 hosts 对象, 正常应该是list, 但是有时候是 str, debug 未果
hosts = config.get('HOSTS', [])
if isinstance(hosts, str) and ',' in hosts:
hosts = hosts.split(',')
config['HOSTS'] = hosts
return copy.deepcopy(config)
@property