Skip to content

Commit

Permalink
Merge pull request #329 from grisu48/update_status
Browse files Browse the repository at this point in the history
Return response on update_status in all cases
  • Loading branch information
asmorodskyi authored Nov 30, 2023
2 parents eca9f33 + 6383215 commit f1ba293
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions ocw/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,10 @@ def update(request):


def update_status(request):
if 'application/json' in request.META.get('HTTP_ACCEPT'):
return JsonResponse({
'status': 'running' if db.is_updating() else 'idle',
'last_update': db.last_update()
})

return redirect('instances')
return JsonResponse({
'status': 'running' if db.is_updating() else 'idle',
'last_update': db.last_update()
})


@login_required
Expand Down

0 comments on commit f1ba293

Please sign in to comment.