fixed minor issue with remote duration conversion

This commit is contained in:
Louis Heredero 2025-02-23 21:45:51 +01:00
parent 9d33377ac1
commit c090b611e2
Signed by: HEL
GPG Key ID: 8D83DE470F8544E7

View File

@ -267,7 +267,8 @@ def set_clocking(request, date: datetime.date):
clocking.out_pm = request.POST.get("out_pm", clocking.out_pm) or None
remote = request.POST.get("remote", clocking.remote) or None
if remote is not None:
remote = str_to_timedelta(remote)
if isinstance(remote, str):
remote = str_to_timedelta(remote)
else:
remote = timedelta()
clocking.remote = remote