don't remove false values from sent dataforms. Fixes #6765, see #6113

This commit is contained in:
Yann Leboulanger 2011-03-05 09:40:01 +01:00
parent e058f2bdad
commit 74904d8505
1 changed files with 2 additions and 2 deletions

View File

@ -679,8 +679,8 @@ class SimpleDataForm(DataForm, DataRecord):
f.value = ''
# Keep all required fields
continue
if (hasattr(f, 'value') and not f.value) or (hasattr(f, 'values') \
and len(f.values) == 0):
if (hasattr(f, 'value') and not f.value and f.value != 0) or (
hasattr(f, 'values') and len(f.values) == 0):
to_be_removed.append(f)
else:
del f.label