better populate

This commit is contained in:
mdipierro
2013-04-24 18:05:22 -05:00
parent 3efa77b57a
commit 97b70eff9f
4 changed files with 52 additions and 23 deletions
+2 -2
View File
@@ -2654,8 +2654,8 @@ class IS_EMPTY_OR(Validator):
if hasattr(other, 'options'):
self.options = self._options
def _options(self):
options = self.other.options()
def _options(self, zero=False):
options = self.other.options(zero=zero)
if (not options or options[0][0] != '') and not self.multiple:
options.insert(0, ('', ''))
return options