Commits

Anonymous committed 06e2fdf

[project @ 380]
Made officers/models.py work for both installation/tests and live web mode

Comments (0)

Files changed (1)

cciw/officers/models.py

     def html2python(data):
         return {'1': None, '2': True, '3': False}.get(data, None)
 
-# For installation, uncomment this:
-#ExplicitBooleanField = models.NullBooleanField
+if not threadlocals.is_web_request():
+    # Need this for installation, uncomment this:
+    ExplicitBooleanField = models.NullBooleanField
 
 class Application(models.Model):
     camp = required_field(models.ForeignKey, Camp, null=True, limit_choices_to={'online_applications': True})