From aa83a200e4fda181a02e0a902368c85f702e7934 Mon Sep 17 00:00:00 2001 From: odex Date: Thu, 1 Aug 2024 11:12:51 +0300 Subject: [PATCH] fix bug --- .../odex_mobile/controllers/rest_api_v2/attendance.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py index c893424af..6b17131a0 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py @@ -349,9 +349,8 @@ class AttendanceController(http.Controller): } li.append(attendance) - return http_helper.response(message="Data Found", data={'total_months':total_months, 'attendaces': li}) - else: - return http_helper.response(code=400,message="Data not Found ", success=False) + return http_helper.response(message="Data Found", data={'total_months':total_months, 'attendaces': li}) + except (UserError, AccessError, ValidationError, Exception, Warning) as e: http.request._cr.rollback() error = str(e)