libushang 9 mesiacov pred
rodič
commit
27534d218e
1 zmenil súbory, kde vykonal 4 pridanie a 3 odobranie
  1. 4 3
      routers/api/eventManagement/event.py

+ 4 - 3
routers/api/eventManagement/event.py

@@ -594,7 +594,7 @@ async def send_emergency_plan_task_by_yzy(
     if plan_id is None or plan_id == '':
         return {
             "code": 500,
-            "msg": "未关联预案"
+            "msg": "未关联预案."
         }
     
     row = db.query(EmergencyPlan).filter(EmergencyPlan.plan_number == plan_id).first()
@@ -695,8 +695,9 @@ async def emergency_plan_task_list(
     plan_id = event_info['plan_id']
     if plan_id is None or plan_id == '':
         return {
-            "code": 500,
-            "msg": "未关联预案"
+            "code": 200,
+            "msg": "未关联预案",
+            "data": []
         }
     
     where = and_(and_(EventEmergencyNotify.plan_id == plan_id, EventEmergencyNotify.event_id == eventId))