lang 3 năm trước cách đây
mục cha
commit
9fe00f0ac6
1 tập tin đã thay đổi với 7 bổ sung3 xóa
  1. 7 3
      Controller/DetectController.py

+ 7 - 3
Controller/DetectController.py

@@ -430,9 +430,13 @@ class NotificationView(View):
                                 extras=push_data)
         push.notification = jpush.notification(android=android)
         push.platform = jpush.all_
-        res = push.send()
-        print(res)
-        return res.status_code
+        try:
+            res = push.send()
+            print(res)
+            status_code = res.status_code
+        except:
+            status_code = 100
+        return status_code
         # try:
         #     res = push.send()
         #     print(res)