32 lines
1.3 KiB
Diff
32 lines
1.3 KiB
Diff
From f61bce925842ab6ff5f9de2d473a3f9e9909b7fa Mon Sep 17 00:00:00 2001
|
|
From: rearcher <123781007@qq.com>
|
|
Date: Tue, 3 Dec 2024 11:18:12 +0800
|
|
Subject: [PATCH] =?UTF-8?q?bugfix:=E4=BF=AE=E5=A4=8D=E6=93=8D=E4=BD=9C?=
|
|
=?UTF-8?q?=E5=90=8D=E5=8F=AF=E4=BF=AE=E6=94=B9=E4=B8=BA=E5=B7=B2=E5=AD=98?=
|
|
=?UTF-8?q?=E5=9C=A8=E7=9A=84=E5=80=BC?=
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
---
|
|
operation-service/zeus/operation_service/app/proxy/operate.py | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/operation-service/zeus/operation_service/app/proxy/operate.py b/operation-service/zeus/operation_service/app/proxy/operate.py
|
|
index ea5c18a..f3d51d4 100644
|
|
--- a/operation-service/zeus/operation_service/app/proxy/operate.py
|
|
+++ b/operation-service/zeus/operation_service/app/proxy/operate.py
|
|
@@ -107,6 +107,9 @@ class OperateProxy(MysqlProxy):
|
|
|
|
def modify_operate_info(self, operate_id, data):
|
|
try:
|
|
+ operate = self.session.query(Operate).filter(Operate.operate_name == data['operate_name']).first()
|
|
+ if operate:
|
|
+ return DATA_EXIST, None
|
|
modified_rows = self.session.query(Operate).filter_by(operate_id = operate_id).update(data)
|
|
self.session.commit()
|
|
if modified_rows != 1:
|
|
--
|
|
Gitee
|
|
|