diff --git a/domain_admin/service/domain_info_service.py b/domain_admin/service/domain_info_service.py index 73190d3d3b..f0c7f2ba4a 100644 --- a/domain_admin/service/domain_info_service.py +++ b/domain_admin/service/domain_info_service.py @@ -226,14 +226,14 @@ def add_domain_from_file(filename, user_id): lst = [ { 'domain': item['domain'], - 'comment': item.get('comment'), - 'group_id': group_map.get(item.get('group_name'), 0), + 'comment': item.get('comment') or '', + 'group_id': group_map.get(item.get('group_name')) or 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'), + 'icp_company': item.get('icp_company') or '', + 'icp_licence': item.get('icp_licence') or '', 'user_id': user_id, } for item in lst if item.get('root_domain') ] diff --git a/domain_admin/service/domain_service.py b/domain_admin/service/domain_service.py index b112c55548..0ee89525c3 100644 --- a/domain_admin/service/domain_service.py +++ b/domain_admin/service/domain_service.py @@ -191,6 +191,7 @@ def sync_address_info_to_domain_info(domain_row): expire_days=first_address_row.real_time_ssl_expire_days, connect_status=connect_status, update_time=datetime_util.get_datetime(), + version=DomainModel.version + 1 ).where( DomainModel.id == domain_row.id ).execute()