Browse Source

系统配置不允许删除

rambo 7 tháng trước cách đây
mục cha
commit
55a0bd1da2
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      python/api.py

+ 2 - 0
python/api.py

@@ -443,6 +443,8 @@ def get_device_configs(params: ModelGetDeviceConfigDetail):
     model = configModel.read(session, conditions={"id": action_id})
     if model == None:
         return {"code": 1, "msg": "数据不存在", "data": None}
+    if model.is_system == True:
+        return {"code": 1, "msg": "系统配置不允许删除", "data": None}
     configModel.delete(session, obj_id=action_id)
     return {"code": 0, "msg": "删除成功", "data": None}