Skip to content

Commit

Permalink
bug
Browse files Browse the repository at this point in the history
  • Loading branch information
delterr committed Apr 6, 2024
1 parent 3e94b46 commit af5f485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/timesheets/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def put(self, timesheet_id):
timesheet.end_work_time = end_time
timesheet.status = "pending"

time_elapsed = datetime.strptime(end_work_time, "%H:%M:%S") - datetime.strptime(start_work_time, "%H:%M:%S")
time_elapsed = datetime.strptime(timesheet.end_work_time, "%H:%M:%S") - datetime.strptime(timesheet.start_work_time, "%H:%M:%S")
time_elapsed = time_elapsed.total_seconds()

timesheet.hours_worked = time_elapsed
Expand Down

0 comments on commit af5f485

Please sign in to comment.