Skip to content

Commit

Permalink
Fix MopClient bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lukipuki committed Oct 29, 2023
1 parent 1e20c49 commit 8d4f81e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/yaroc/clients/mop.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,10 @@ async def send_punch(
if code == 1:
result.start = tim
elif code == 2:
result.time = tim - result.start
if result.start is None:
result.time = tim - timedelta(hours=10) # TODO: hardcoded start time
else:
result.time = tim - result.start
result.stat = MopClient.STAT_OK
return await self.send_result(result)
else:
Expand Down

0 comments on commit 8d4f81e

Please sign in to comment.