Skip to content

Commit

Permalink
支持域名icp信息的导入
Browse files Browse the repository at this point in the history
  • Loading branch information
mouday committed Feb 1, 2024
1 parent 2e79146 commit 31c2e36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions domain_admin/migrate/migrate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@
'migrate_func': migrate_1533_to_1534.execute_migrate,
'update_version': VersionEnum.Version_1534
},
# 2023-11-28
# 1.5.33 => 1.5.34
# 2024-01-28
# 1.5.34 => 1.6.2
{
'local_versions': [
VersionEnum.Version_1534,
Expand Down
8 changes: 7 additions & 1 deletion domain_admin/service/domain_info_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,11 @@ def add_domain_from_file(filename, user_id):
'comment': item.get('comment'),
'group_id': group_map.get(item.get('group_name'), 0),
'tags_raw': json.dumps(item.get('tags'), ensure_ascii=False),
'domain_start_time': item.get('domain_start_date'),
'domain_expire_time': item.get('domain_expire_date'),
'domain_expire_days': item.get('real_domain_expire_days') or 0,
'icp_company': item.get('icp_company'),
'icp_licence': item.get('icp_licence'),
'user_id': user_id,
} for item in lst if item.get('root_domain')
]
Expand Down Expand Up @@ -376,7 +381,8 @@ def handle_auto_import_domain_info(current_user_id):

# icp信息
for row in lst:
update_domain_row_icp(row)
if not row.icp_company:
update_domain_row_icp(row)

# 导入子域名
for row in lst:
Expand Down

0 comments on commit 31c2e36

Please sign in to comment.