Commit 662df265 by Kálmán Viktor

dashboard: fix mass delete failing when one vm has an activity in progress

parent dd0e44ed
...@@ -1513,8 +1513,11 @@ class VmMassDelete(LoginRequiredMixin, View): ...@@ -1513,8 +1513,11 @@ class VmMassDelete(LoginRequiredMixin, View):
raise PermissionDenied() # no need for rollback or proper raise PermissionDenied() # no need for rollback or proper
# error message, this can't # error message, this can't
# normally happen. # normally happen.
try:
i.destroy.async(user=request.user) i.destroy.async(user=request.user)
names.append(i.name) names.append(i.name)
except Exception as e:
logger.error(e)
success_message = _("Mass delete complete, the following VMs were " success_message = _("Mass delete complete, the following VMs were "
"deleted: %s!") % u', '.join(names) "deleted: %s!") % u', '.join(names)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment