From 95eff02e7ce7db5bc77d43b9d5a90a53dffea79a Mon Sep 17 00:00:00 2001 From: odex Date: Thu, 1 Aug 2024 11:22:00 +0300 Subject: [PATCH] fix bug --- .../odex_mobile/controllers/rest_api_v2/attendance.py | 5 +++-- 1 file changed, 3 insertions(+), 2 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 6b17131a0..f52ee08f7 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py @@ -349,8 +349,9 @@ class AttendanceController(http.Controller): } li.append(attendance) - return http_helper.response(message="Data Found", data={'total_months':total_months, 'attendaces': li}) - + return http_helper.response(message="Data Found", data={'total_months':total_months, 'attendaces': li}) + else: + return http_helper.response(message="Data not Found", data={'attendaces': li}) except (UserError, AccessError, ValidationError, Exception, Warning) as e: http.request._cr.rollback() error = str(e)