From 62114a3d9fceefb7fded36bc9b58c778579b2d2b Mon Sep 17 00:00:00 2001 From: richard Date: Sat, 28 Jul 2001 00:34:34 +0000 Subject: [PATCH] Fixed some non-string node ids. git-svn-id: http://svn.roundup-tracker.org/svnroot/roundup/trunk@109 57a73879-2fb5-44c3-a270-3262357dd7e2 --- roundup/cgi_client.py | 21 ++++++++++++--------- roundup/mailgw.py | 11 +++++++---- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/roundup/cgi_client.py b/roundup/cgi_client.py index da4853a..9dbed7f 100644 --- a/roundup/cgi_client.py +++ b/roundup/cgi_client.py @@ -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 # diff --git a/roundup/mailgw.py b/roundup/mailgw.py index 0324aab..e95e693 100644 --- a/roundup/mailgw.py +++ b/roundup/mailgw.py @@ -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 +# # -- 2.30.2