X-Git-Url: https://git.mdrn.pl/redakcja.git/blobdiff_plain/8f392c8987476f29a38fa33ab06c36471ff2cb98..f97b2766119a572959796b00a9d3438685b13e85:/apps/organizations/models.py?ds=sidebyside

diff --git a/apps/organizations/models.py b/apps/organizations/models.py
index 9d3300a2..6a7aa7ac 100644
--- a/apps/organizations/models.py
+++ b/apps/organizations/models.py
@@ -1,3 +1,4 @@
+# -*- coding: utf-8 -*-
 from __future__ import unicode_literals
 
 from django.core.urlresolvers import reverse
@@ -5,8 +6,7 @@ from django.contrib.auth.models import User
 from django.db import models
 from django.utils.encoding import python_2_unicode_compatible
 from django.template.loader import render_to_string
-from django.utils import translation 
-#from jsonfield import JSONField
+from django.utils import translation
 
 
 countries = [
@@ -83,9 +83,10 @@ class Card(models.Model):
             p = getattr(self, "preview_html_%s" % lang)
             assert p
             return p
-        except:
+        except (AssertionError, AttributeError):
             return self.preview_html
 
+
 @python_2_unicode_compatible
 class UserCard(Card):
     preview_html_template = 'organizations/snippets/user.html'