diff --git a/product/models.py b/product/models.py index 16a8fef..94b7ca0 100644 --- a/product/models.py +++ b/product/models.py @@ -3,7 +3,9 @@ from django.db import models # class ProjectStatus(models.TextChoices): # KICKOUT = 'KICKOUT','立项' # DESIGN = 'DESIGN', '产品设计' +# WAIT_DEV = 'WAIT_DEV', '开发排期中' # DEV = 'DEV', '开发中' +# WAIT_TEST = 'WAIT_TEST', '测试排期中' # TEST = 'TEST', '测试中' # FINISH = 'FINISH', '结测待上线' # ONLINE = 'ONLINE', '已上线' diff --git a/update/utils/client_util_custom.py b/update/utils/client_util_custom.py index 32681d2..56f82ec 100644 --- a/update/utils/client_util_custom.py +++ b/update/utils/client_util_custom.py @@ -74,8 +74,19 @@ class ClientUtilCustom: local_file.close() # 关闭smb服务 self.smb_disconnect() + self.fix_data() return True + def fix_data(self): + print('fix_data') + fix_client_data = ClientRelease.objects.filter(is_cached=False).order_by('-id').all()[:5] + local_file_list = list(os.walk(self.local_path))[0][2] + for client in fix_client_data: + if client.origin_name in local_file_list: + client.is_cached = True + client.file_name = client.origin_name + + def handle_client_data_format(self, client_data_list): print('handle_client_data_format') for data in client_data_list: