allow enforce_choices to treat empty string and none as the same
diff --git a/xos/core/models/plcorebase.py b/xos/core/models/plcorebase.py
index 5878fff..360792f 100644
--- a/xos/core/models/plcorebase.py
+++ b/xos/core/models/plcorebase.py
@@ -137,6 +137,9 @@
for choice in choices:
if field==choice:
return
+ if (choice==None) and (field==""):
+ # allow "" and None to be equivalent
+ return
raise Exception("Field value %s is not in %s" % (field, str(choices)))
class PlCoreBase(models.Model, PlModelMixIn):