From 0029e1fc253aa87f5401cdff2d6d13071e4a6f0a Mon Sep 17 00:00:00 2001 From: stefan Date: Thu, 19 Feb 2009 20:00:44 +0000 Subject: [PATCH] Do not try to create empty nodes with a negative ID. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/roundup/trunk@4141 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi/form_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roundup/cgi/form_parser.py b/roundup/cgi/form_parser.py index 260340e..ae7ef17 100755 --- a/roundup/cgi/form_parser.py +++ b/roundup/cgi/form_parser.py @@ -563,11 +563,11 @@ class FormParser: # either have a non-empty content property or no property at all. In # the latter case, nothing will change. for (cn, id), props in all_props.items(): - if id and id.startswith('-') and not props: + if id is not None and id.startswith('-') and not props: # new item (any class) with no content - ignore del all_props[(cn, id)] elif isinstance(self.db.classes[cn], hyperdb.FileClass): - if id and id.startswith('-'): + if id is not None and id.startswith('-'): if not props.get('content', ''): del all_props[(cn, id)] elif props.has_key('content') and not props['content']: -- 2.30.2