From 74904d85056c9492661cb4d0d7432c29c7d7dd64 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 5 Mar 2011 09:40:01 +0100 Subject: [PATCH] don't remove false values from sent dataforms. Fixes #6765, see #6113 --- src/common/dataforms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/dataforms.py b/src/common/dataforms.py index 995119979..8cc5cc2b9 100644 --- a/src/common/dataforms.py +++ b/src/common/dataforms.py @@ -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