diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/authentication.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/authentication.py index 7ab82ce07..4abf6854c 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/authentication.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/authentication.py @@ -251,6 +251,7 @@ class AuthenticationController(http.Controller): dic['token'] = token dic['is_approve'] = 'group_division_manager' in dic.get('groups',[]) + dic['has_two_periods'] = not employee.resource_calendar_id.is_full_day if employee.resource_calendar_id else False http_helper.cleanup() end_time_pc = time.perf_counter() execution_time_pc = end_time_pc - start_time_pc diff --git a/odex25_mobile/odex_mobile/models/res_users.py b/odex25_mobile/odex_mobile/models/res_users.py index 0df35bd5c..c0fbcaaac 100644 --- a/odex25_mobile/odex_mobile/models/res_users.py +++ b/odex25_mobile/odex_mobile/models/res_users.py @@ -69,6 +69,7 @@ class Users(models.Model): d["employe_id"] = employee.id if employee and employee.id else None d["attendance_status"] = attendance_status if attendance_status else None d['is_approve'] = 'group_division_manager' in d.get('groups',[]) + d['has_two_periods'] = not employee.resource_calendar_id.is_full_day if employee.resource_calendar_id else False res.append(d) return res[0] if single else res