Commit 406a837a by Bach Dániel Committed by Kálmán Viktor

dashboard: fix EncodeError in VmCreate

parent b8d4d226
...@@ -1108,8 +1108,10 @@ class VmCreate(LoginRequiredMixin, TemplateView): ...@@ -1108,8 +1108,10 @@ class VmCreate(LoginRequiredMixin, TemplateView):
return self.__deploy(request, instances) return self.__deploy(request, instances)
def __deploy(self, request, instances, *args, **kwargs): def __deploy(self, request, instances, *args, **kwargs):
# workaround EncodeError: dictionary changed size during iteration
user = User.objects.get(pk=request.user.pk)
for i in instances: for i in instances:
i.deploy.async(user=request.user) i.deploy.async(user=user)
if len(instances) > 1: if len(instances) > 1:
messages.success(request, ungettext_lazy( messages.success(request, ungettext_lazy(
......
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