Commit b6b57fa4 by Chif Gergő

Fix flake8 warning, rename function

parent 4fc8b149
Pipeline #658 failed with stage
in 0 seconds
......@@ -193,6 +193,7 @@ class NodeList(LoginRequiredMixin, GraphMixin, SingleTableView):
def get(self, *args, **kwargs):
if not self.request.user.has_perm('vm.view_statistics'):
raise PermissionDenied()
if self.request.is_ajax():
nodes = Node.objects.all()
nodes = [{
......@@ -210,14 +211,14 @@ class NodeList(LoginRequiredMixin, GraphMixin, SingleTableView):
return super(NodeList, self).get(*args, **kwargs)
def get_queryset(self):
return Node.objects.annotate(
def wrong_node_message(self):
def wrong_nodes_message(self):
for node in Node.objects.all():
if node.monitor_info is None:
messages.error(self.request, "Can't reach "" monitor info")
"Can't reach " + + " monitor info")
class NodeCreate(LoginRequiredMixin, SuperuserRequiredMixin, TemplateView):
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