Commit d89d75c8 by Kálmán Viktor Committed by Guba Sándor

dashboard: call save as async

parent 3aaf7e00
......@@ -422,12 +422,13 @@ class VmDetailView(CheckedDetailView):
new_name = "Saved from %s (#%d) at %s" % (
self.object.name, self.object.pk, date
)
template = self.object.save_as_template(name=new_name,
# TODO csak egy maradhat!!
self.object.save_as_template_async(name=new_name,
user=request.user,
owner=request.user)
messages.success(request, _("Instance successfully saved as template, "
"please rename it!"))
return redirect(reverse_lazy("dashboard.views.template-detail",
kwargs={'pk': template.pk}))
messages.success(request, _("Saving instance as template!"))
return redirect("%s#activity" % self.object.get_absolute_url())
def __shut_down(self, request):
self.object = self.get_object()
......
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