Commit ffcc0c36 by François C.

#4743: Log 'record_service_presence' activity

parent c14fce2d
Pipeline #2745 passed with stage
in 1 minute 29 seconds
......@@ -290,7 +290,8 @@ def record_service_presence(request):
stid = int(request.POST.get("stid", 0)) # shift_ticket_id
cancel = request.POST.get("cancel") == 'true'
typeAction = str(request.POST.get("type"))
coop_logger.info("Enregistrement presence : mid = %s, rid = %s, sid = %s, stid = %s, cancel = %s, typeAction = %s",
str(mid), str(rid), str(sid), str(stid), str(cancel), typeAction)
app_env = getattr(settings, 'APP_ENV', "prod")
if (rid > -1 and mid > 0):
overrided_date = ""
......@@ -312,6 +313,7 @@ def record_service_presence(request):
res['update'] = 'ok'
else:
res['update'] = 'ko'
coop_logger.info("Résultat update record_service_presence : %s", res['update'])
if res['update'] == 'ok':
members = CagetteMember.search('id', mid)
m = members[0]
......@@ -327,6 +329,7 @@ def record_service_presence(request):
except Exception as e:
res['error'] = str(e)
coop_logger.error("Erreur record_service_presence : %s", str(e))
return JsonResponse({'res': res})
def easy_validate_shift_presence(request):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment