diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py index 8a4e00eee..1a79f5075 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/leave.py @@ -93,7 +93,7 @@ class LeaveController(http.Controller): offset=offset, limit=limit) count = http.request.env['hr.holidays'].search_count( [('state', 'in', ['confirm','validate','approved']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')],) - if done: + elif done: holidays = http.request.env['hr.holidays'].search( [('state', 'in', ['validate1','refuse','cancel']), ('employee_id', '!=', employee.id), ('type', '=', 'remove')], offset=offset, limit=limit)