Commit 386b5d3e by Oláh István Gergely

dashboard: change filter+update to enable-disable in NodeStatus

parent 2410e2e1
...@@ -1269,11 +1269,9 @@ class NodeStatus(LoginRequiredMixin, SuperuserRequiredMixin, DetailView): ...@@ -1269,11 +1269,9 @@ class NodeStatus(LoginRequiredMixin, SuperuserRequiredMixin, DetailView):
def __set_status(self, request): def __set_status(self, request):
self.object = self.get_object() self.object = self.get_object()
if not self.object.enabled: if not self.object.enabled:
Node.objects.filter(pk=self.object.pk).update( self.object.enable(user=request.user)
**{'enabled': True})
else: else:
Node.objects.filter(pk=self.object.pk).update( self.object.disable(user=request.user)
**{'enabled': False})
success_message = _("Node successfully changed status!") success_message = _("Node successfully changed status!")
......
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