Code

sigh.. not python2.3 yet
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 24 Mar 2004 05:56:49 +0000 (05:56 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Wed, 24 Mar 2004 05:56:49 +0000 (05:56 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@2174 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi/templating.py

index 0d644dd22d033dc9ba18662530dbf742e1ea7a54..a403481864364642d7a03072f332ee334593f6d9 100644 (file)
@@ -276,7 +276,7 @@ class HTMLDatabase:
             m.append(HTMLClass(self._client, item))
         return r
 
-def lookupIds(db, prop, ids, fail_ok=False, num_re=re.compile('-?\d+')):
+def lookupIds(db, prop, ids, fail_ok=0, num_re=re.compile('-?\d+')):
     ''' "fail_ok" should be specified if we wish to pass through bad values
         (most likely form values that we wish to represent back to the user)
     '''
@@ -401,12 +401,12 @@ class HTMLClass(HTMLInputMixin, HTMLPermissions):
             if form.has_key(item):
                 if isinstance(prop, hyperdb.Multilink):
                     value = lookupIds(self._db, prop,
-                        handleListCGIValue(form[item]), fail_ok=True)
+                        handleListCGIValue(form[item]), fail_ok=1)
                 elif isinstance(prop, hyperdb.Link):
                     value = form[item].value.strip()
                     if value:
                         value = lookupIds(self._db, prop, [value],
-                            fail_ok=True)[0]
+                            fail_ok=1)[0]
                     else:
                         value = None
                 else: