Skip to content

Commit

Permalink
Fix stop, use guest name (kevoreilly#2152)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangchen96 authored Jun 4, 2024
1 parent 89be658 commit 8f5442a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/apiv2/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1097,7 +1097,7 @@ def tasks_status(request, task_id):
status = task.to_dict()["status"]
resp = {"error": False, "data": status}
elif request.method == "POST" and apiconf.user_stop.enabled and request.data.get("status", "") == "finish":
machine = db.view_machine(task.machine)
machine = db.view_machine(task.guest.name)
# Todo probably add task status if pending
if machine.status == "running":
try:
Expand Down

0 comments on commit 8f5442a

Please sign in to comment.