From b0a263626bbfd0665da5a8c3bd3daa736bc1c6de Mon Sep 17 00:00:00 2001 From: pengshiyu <1940607002@qq.com> Date: Thu, 18 Apr 2024 17:20:50 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20sqlite=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E5=9F=9F=E5=90=8D=E7=9B=91=E6=8E=A7=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E5=AF=BC=E5=85=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- domain_admin/service/domain_info_service.py | 8 ++++---- domain_admin/service/domain_service.py | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) 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()