Skip to content

Commit

Permalink
Fix for in-progress job, zooming is limited to end = now()
Browse files Browse the repository at this point in the history
  • Loading branch information
guilbaults committed Jun 6, 2024
1 parent 534cec2 commit 7b410a3
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jobstats/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,11 @@ def context_job_info(request, username, job_id):
context['gpu_count'] = context['job'].gpu_count()

context['start'] = context['job'].time_start_dt()
context['end'] = context['job'].time_end_dt()
if context['job'].time_end_dt() is None:
# If the job has not ended, use the current time
context['end'] = datetime.now()
else:
context['end'] = context['job'].time_end_dt()
# Handle start and end time from request GET params
if request is not None:
if 'start' in request.GET:
Expand Down

0 comments on commit 7b410a3

Please sign in to comment.