Fixes lower() applied to None string, and not empty string as changeset 506 has mistakenly fixed.
authorgibus
Tue, 25 Jun 2013 16:00:21 +0200
changeset 508 89d9484d1b50
parent 507 242b380592b3
child 509 ff6921599cbc
Fixes lower() applied to None string, and not empty string as changeset 506 has mistakenly fixed.
src/cm/views/texts.py
--- a/src/cm/views/texts.py	Tue Jun 25 13:49:39 2013 +0200
+++ b/src/cm/views/texts.py	Tue Jun 25 16:00:21 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)] and text_version.__dict__['category_' + str(i)].lower() != 'none':
+      if text_version.__dict__['category_' + str(i)] != None 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: