Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix Bug 1125011 - Non-existent security advisory translations are not…
… redirected to en-US
  • Loading branch information
kyoshino committed Jan 27, 2015
1 parent 42c7a4b commit d4c2f16
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bedrock/security/views.py
Expand Up @@ -11,6 +11,7 @@
from funfactory.urlresolvers import reverse
from product_details import product_details
from product_details.version_compare import Version
from lib.l10n_utils import LangFilesMixin

from bedrock.mozorg.decorators import cache_control_expires
from bedrock.security.models import Product, SecurityAdvisory
Expand Down Expand Up @@ -101,7 +102,7 @@ def latest_advisory(request, *args, **kwargs):
return latest.last_modified


class AdvisoriesView(ListView):
class AdvisoriesView(LangFilesMixin, ListView):
template_name = 'security/advisories.html'
queryset = SecurityAdvisory.objects.only('id', 'impact', 'title', 'announced')
context_object_name = 'advisories'
Expand All @@ -112,7 +113,7 @@ def dispatch(self, request, *args, **kwargs):
return super(AdvisoriesView, self).dispatch(request, *args, **kwargs)


class AdvisoryView(DetailView):
class AdvisoryView(LangFilesMixin, DetailView):
model = SecurityAdvisory
template_name = 'security/advisory.html'
context_object_name = 'advisory'
Expand All @@ -123,7 +124,7 @@ def dispatch(self, request, *args, **kwargs):
return super(AdvisoryView, self).dispatch(request, *args, **kwargs)


class ProductView(ListView):
class ProductView(LangFilesMixin, ListView):
template_name = 'security/product-advisories.html'
context_object_name = 'product_versions'
allow_empty = False
Expand Down Expand Up @@ -152,7 +153,7 @@ def get_context_data(self, **kwargs):
return cxt


class ProductVersionView(ListView):
class ProductVersionView(LangFilesMixin, ListView):
template_name = 'security/product-advisories.html'
context_object_name = 'product_versions'
allow_empty = False
Expand Down

0 comments on commit d4c2f16

Please sign in to comment.