Merge pull request 'fixed minor issue with remote duration conversion' (#1) from dev into main
Reviewed-on: #1
This commit is contained in:
commit
af938f405d
@ -267,7 +267,8 @@ def set_clocking(request, date: datetime.date):
|
|||||||
clocking.out_pm = request.POST.get("out_pm", clocking.out_pm) or None
|
clocking.out_pm = request.POST.get("out_pm", clocking.out_pm) or None
|
||||||
remote = request.POST.get("remote", clocking.remote) or None
|
remote = request.POST.get("remote", clocking.remote) or None
|
||||||
if remote is not None:
|
if remote is not None:
|
||||||
remote = str_to_timedelta(remote)
|
if isinstance(remote, str):
|
||||||
|
remote = str_to_timedelta(remote)
|
||||||
else:
|
else:
|
||||||
remote = timedelta()
|
remote = timedelta()
|
||||||
clocking.remote = remote
|
clocking.remote = remote
|
||||||
@ -307,4 +308,4 @@ def set_real_sagex(request, id, month: datetime.date):
|
|||||||
return JsonResponse({
|
return JsonResponse({
|
||||||
"status": "success",
|
"status": "success",
|
||||||
"sagex": RealSageXHoursSerializer(entry).data
|
"sagex": RealSageXHoursSerializer(entry).data
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user