Created
January 21, 2010 17:22
-
-
Save beniwohli/282962 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cms/models/__init__.py b/cms/models/__init__.py | |
index bca24e6..557e1cf 100644 | |
--- a/cms/models/__init__.py | |
+++ b/cms/models/__init__.py | |
@@ -35,7 +35,7 @@ def monkeypatch_reverse(): | |
url = '' | |
i18n = 'cms.middleware.multilingual.MultilingualURLMiddleware' in settings.MIDDLEWARE_CLASSES | |
lang = None | |
- if viewname.split(":")[0] in dict(settings.LANGUAGES).keys(): | |
+ if isinstance(viewname, basestring) and viewname.split(":")[0] in dict(settings.LANGUAGES).keys(): | |
lang = viewname.split(":")[0] | |
try: | |
url = django.core.urlresolvers.old_reverse(viewname, urlconf=urlconf, args=args, kwargs=kwargs, prefix=prefix, current_app=current_app) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment