Skip to content

Commit

Permalink
Fixed 404 bug
Browse files Browse the repository at this point in the history
  • Loading branch information
h3 committed May 15, 2012
1 parent 3385383 commit 519d9fa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion seoutils/frontadmin_plugin.py
@@ -1,4 +1,5 @@
from django.core.urlresolvers import reverse, resolve
from django.core.urlresolvers import Resolver404
from django.template import RequestContext
from django.conf import settings

Expand All @@ -23,7 +24,12 @@ def get_context(self):
return ''

meta = get_meta_for_request(self.request)
url_name = resolve(self.request.META['PATH_INFO']).url_name

try:
url_name = resolve(self.request.META['PATH_INFO']).url_name
except Resolver404:
return ''

if meta:
url = reverse('admin:seoutils_meta_change', args=[meta.pk])
else:
Expand Down

0 comments on commit 519d9fa

Please sign in to comment.