From d7a6adead790087872551bbcb33f78767ddcdabf Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 13 Feb 2023 15:19:25 +0800 Subject: [PATCH] opeartion partial update --- .gitignore | 1 + apps/ai/main.py | 2 ++ apps/opm/views.py | 1 + apps/utils/tools.py | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 674ec31e..406f8ec4 100755 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,5 @@ db.sqlite3 server/conf.py server/conf.ini sh/* +temp/* nohup.out \ No newline at end of file diff --git a/apps/ai/main.py b/apps/ai/main.py index 54fd2a49..912fdd84 100644 --- a/apps/ai/main.py +++ b/apps/ai/main.py @@ -24,6 +24,8 @@ def ai_analyse(codes: list, global_img: str, face_img: str = '', is_dahua_pic: b codes: 算法列表 global_img (str): 全景图片url地址 face_img (str): 人脸图片url地址 + Return: + {'qiping': [[x, y]]} """ results = {} # dict key: 触发的事件标识字符 value: 多个矩形框坐标列表; 有两个图片key值 global_img_path = '' diff --git a/apps/opm/views.py b/apps/opm/views.py index a1cba795..718b402a 100644 --- a/apps/opm/views.py +++ b/apps/opm/views.py @@ -36,6 +36,7 @@ class OperationViewSet(CustomModelViewSet): queryset = Operation.objects.all() create_serializer_class = OperationCreateUpdateSerializer update_serializer_class = OperationCreateUpdateSerializer + partial_update_serializer_class = OperationPartialUpdateSerializer serializer_class = OperationDetailSerializer retrieve_serializer_class = OperationDetailSerializer select_related_fields = ['area', 'dept_bus', 'dept_ter', 'coordinator'] diff --git a/apps/utils/tools.py b/apps/utils/tools.py index 8e23b632..9727c246 100755 --- a/apps/utils/tools.py +++ b/apps/utils/tools.py @@ -196,4 +196,4 @@ def check_phone_e(phone): re_phone = r'^1\d{10}$' if not re.match(re_phone, phone): raise ValidationError('手机号格式错误') - return phone + return phone \ No newline at end of file