Code

Fixed some non-string node ids.
authorrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sat, 28 Jul 2001 00:34:34 +0000 (00:34 +0000)
committerrichard <richard@57a73879-2fb5-44c3-a270-3262357dd7e2>
Sat, 28 Jul 2001 00:34:34 +0000 (00:34 +0000)
git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@109 57a73879-2fb5-44c3-a270-3262357dd7e2

roundup/cgi_client.py
roundup/mailgw.py

index da4853a4b7d2e24ff1c2a355da61ad91de21ca93..9dbed7f2b1255f22e2ccbb327aeb9157494dfc82 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: cgi_client.py,v 1.3 2001-07-23 03:56:30 richard Exp $
+# $Id: cgi_client.py,v 1.4 2001-07-28 00:34:34 richard Exp $
 
 import os, cgi, pprint, StringIO, urlparse, re, traceback
 
@@ -278,7 +278,7 @@ class Client:
 
                     # now create the message
                     content = '\n'.join(m)
-                    message_id = self.db.msg.create(author=1, recipients=[],
+                    message_id = self.db.msg.create(author='1', recipients=[],
                         date=date.Date('.'), summary=summary, content=content)
                     messages = cl.get(nid, 'messages')
                     messages.append(message_id)
@@ -324,13 +324,13 @@ class Client:
                         continue
                     proptype = cl.properties[key]
                     if proptype.isStringType:
-                        value = str(self.form[key].value).strip()
+                        value = self.form[key].value.strip()
                     elif proptype.isDateType:
-                        value = date.Date(str(self.form[key].value))
+                        value = date.Date(self.form[key].value.strip())
                     elif proptype.isIntervalType:
-                        value = date.Interval(str(self.form[key].value))
+                        value = date.Interval(self.form[key].value.strip())
                     elif proptype.isLinkType:
-                        value = str(self.form[key].value).strip()
+                        value = self.form[key].value.strip()
                         # handle key values
                         link = cl.properties[key].classname
                         if not num_re.match(value):
@@ -342,9 +342,9 @@ class Client:
                     elif proptype.isMultilinkType:
                         value = self.form[key]
                         if type(value) != type([]):
-                            value = [i.strip() for i in str(value.value).split(',')]
+                            value = [i.strip() for i in value.value.split(',')]
                         else:
-                            value = [str(i.value).strip() for i in value]
+                            value = [i.value.strip() for i in value]
                         link = cl.properties[key].classname
                         l = []
                         for entry in map(str, value):
@@ -402,7 +402,7 @@ class Client:
 
                     # now create the message
                     content = '\n'.join(m)
-                    message_id = self.db.msg.create(author=1, recipients=[],
+                    message_id = self.db.msg.create(author='1', recipients=[],
                         date=date.Date('.'), summary=summary, content=content)
                     messages = cl.get(nid, 'messages')
                     messages.append(message_id)
@@ -489,6 +489,9 @@ class Client:
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.3  2001/07/23 03:56:30  richard
+# oops, missed a config removal
+#
 # Revision 1.2  2001/07/22 12:09:32  richard
 # Final commit of Grande Splite
 #
index 0324aab99bd351f62e1f2d211466a215d39ffa18..e95e6934c175f1a72b35e139774c5cba7ddf9486 100644 (file)
@@ -44,7 +44,7 @@ are calling the create() method to create a new node). If an auditor raises
 an exception, the original message is bounced back to the sender with the
 explanatory message given in the exception. 
 
-$Id: mailgw.py,v 1.2 2001-07-22 12:09:32 richard Exp $
+$Id: mailgw.py,v 1.3 2001-07-28 00:34:34 richard Exp $
 '''
 
 
@@ -252,11 +252,11 @@ class MailGW:
                 date=date.Date('.'), summary=summary, content=content,
                 files=files)
             if not props.has_key('assignedto'):
-                props['assignedto'] = 1             # "admin"
+                props['assignedto'] = '1'             # "admin"
             if not props.has_key('priority'):
-                props['priority'] = 1               # "bug-fatal"
+                props['priority'] = '1'               # "bug-fatal"
             if not props.has_key('status'):
-                props['status'] = 1                 # "unread"
+                props['status'] = '1'                 # "unread"
             if not props.has_key('title'):
                 props['title'] = title
             props['messages'] = [message_id]
@@ -267,4 +267,7 @@ class MailGW:
 
 #
 # $Log: not supported by cvs2svn $
+# Revision 1.2  2001/07/22 12:09:32  richard
+# Final commit of Grande Splite
+#
 #