src/cm/views/texts.py
changeset 506 8ae1c5ac60fb
parent 504 b2e0186daa5b
child 508 89d9484d1b50
--- a/src/cm/views/texts.py	Tue Jun 25 13:30:31 2013 +0200
+++ b/src/cm/views/texts.py	Tue Jun 25 13:34:18 2013 +0200
@@ -248,7 +248,7 @@
     from cm.models import ApplicationConfiguration
     categories = {}
     for i in range(1, 6):
-      if text_version.__dict__['category_' + str(i)].lower() != 'none':
+      if text_version.__dict__['category_' + str(i)] and text_version.__dict__['category_' + str(i)].lower() != 'none':
         if text_version.__dict__['category_' + str(i)] != None and text_version.__dict__['category_' + str(i)] != '':
           categories[i] = text_version.__dict__['category_' + str(i)]
         else: