1. Mikhail Korobov
  2. django-vkontakte-iframe

Commits

Evgeniy Kirov  committed 189d2ee

Workaround for AttributeError in forms.py (check_for_language(lang_code))

  • Participants
  • Parent commits e6957bb
  • Branches default

Comments (0)

Files changed (1)

File vk_iframe/forms.py

View file
             if language[0] == int(self.cleaned_data['language']):
                 lang_code = language[1]
                 break
-        if check_for_language(lang_code):
-            return lang_code
+        try:
+            if check_for_language(lang_code):
+                return lang_code
+        except AttributeError:
+            pass
         return None