From 81a12dfc93c9c1366686ea069b7dabcb66977934 Mon Sep 17 00:00:00 2001 From: rogersun Date: Tue, 21 Apr 2026 10:07:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=95=B0=E6=8D=AE=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E5=8A=9F=E8=83=BD2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/utils/client_util_custom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/update/utils/client_util_custom.py b/update/utils/client_util_custom.py index 055be26..575d8dd 100644 --- a/update/utils/client_util_custom.py +++ b/update/utils/client_util_custom.py @@ -34,6 +34,8 @@ class ClientUtilCustom: self.smb_conn.close() def sync_client_db(self): + # 尝试修复数据 + self.fix_data() # 获取本地数据库最大的同步ID self.deploy_id = ClientRelease.objects.all().aggregate(Max('deploy_id'))['deploy_id__max'] print('deploy_id', self.deploy_id) @@ -74,7 +76,6 @@ class ClientUtilCustom: local_file.close() # 关闭smb服务 self.smb_disconnect() - self.fix_data() return True def fix_data(self): @@ -87,7 +88,6 @@ class ClientUtilCustom: client.file_name = client.origin_name client.save() - def handle_client_data_format(self, client_data_list): print('handle_client_data_format') for data in client_data_list: @@ -173,7 +173,7 @@ class ClientUtilCustom: release_ver = server_release[8:11] if server_release.startswith('2') else server_release[7:10] if client_ver is None or client_ver == '': - print('1'*100) + print('1' * 100) client = ClientRelease.objects.filter(Q(ver_id=release_ver) & Q(is_cached=True)).order_by('-id').first() else: print('2' * 100) @@ -200,4 +200,4 @@ class ClientUtilCustom: db_conn.commit() db_cursor.close() db_conn.close() - return client.origin_name \ No newline at end of file + return client.origin_name