diff roundup/cgi/form_parser.py @ 3980:3167ad1c19cd

Allow negative ids other than -1 for item generation [SF#982481]
author Richard Jones <richard@users.sourceforge.net>
date Thu, 07 Aug 2008 05:59:18 +0000
parents 63d58cc1394a
children c9a8a47c4666
line wrap: on
line diff
--- a/roundup/cgi/form_parser.py	Thu Aug 07 05:53:14 2008 +0000
+++ b/roundup/cgi/form_parser.py	Thu Aug 07 05:59:18 2008 +0000
@@ -563,11 +563,11 @@
         # 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 == '-1') and not props:
+            if id 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 == '-1':
+                if id and id.startswith('-'):
                     if not props.get('content', ''):
                         del all_props[(cn, id)]
                 elif props.has_key('content') and not props['content']:

Roundup Issue Tracker: http://roundup-tracker.org/