Commit 226520e5 by Bach Dániel

dashboard: raise Http404 instead of SuspiciousOperation in GraphViewBase

parent 26742917
...@@ -21,7 +21,7 @@ import logging ...@@ -21,7 +21,7 @@ import logging
import requests import requests
from django.conf import settings from django.conf import settings
from django.core.exceptions import PermissionDenied, SuspiciousOperation from django.core.exceptions import PermissionDenied
from django.http import HttpResponse, Http404 from django.http import HttpResponse, Http404
from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ugettext_lazy as _
from django.views.generic import View from django.views.generic import View
...@@ -52,7 +52,7 @@ class GraphViewBase(LoginRequiredMixin, View): ...@@ -52,7 +52,7 @@ class GraphViewBase(LoginRequiredMixin, View):
try: try:
metric = self.metrics[metric] metric = self.metrics[metric]
except KeyError: except KeyError:
raise SuspiciousOperation() raise Http404()
try: try:
instance = self.get_object(request, pk) instance = self.get_object(request, pk)
......
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