Commit 64e4e9d5 by Guba Sándor

dashboard/views: fixed node state change to user model.Node

parent d56aeab7
...@@ -465,11 +465,9 @@ class NodeDetailView(LoginRequiredMixin, SuperuserRequiredMixin, DetailView): ...@@ -465,11 +465,9 @@ class NodeDetailView(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
self.object = self.get_object() self.object = self.get_object()
new_status = request.POST.get("new_status") new_status = request.POST.get("new_status")
if new_status == "enable": if new_status == "enable":
Node.objects.filter(pk=self.object.pk).update( self.object.enable(user=request.user)
**{'enabled': True})
elif new_status == "disable": elif new_status == "disable":
Node.objects.filter(pk=self.object.pk).update( self.object.disable(user=request.user)
**{'enabled': False})
else: else:
return return
......
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