[Zope3-checkins] CVS: Products3/bugtracker/browser - tracker.py:1.4

Stephan Richter srichter@cosmos.phy.tufts.edu
Mon, 28 Jul 2003 06:21:44 -0400


Update of /cvs-repository/Products3/bugtracker/browser
In directory cvs.zope.org:/tmp/cvs-serv8367/browser

Modified Files:
	tracker.py 
Log Message:
- Since it takes a lot of code to setup bug tracker tests, I moved that
  initialization to placelessetup and corrected the tests for it.

- Implemented XML-RPC methods for possible mail-in feature. Wouldn't it be 
  neat if you could send an E-mail as follows:

Title: Bug 231 - Add Comment

This is the comment...


=== Products3/bugtracker/browser/tracker.py 1.3 => 1.4 ===
--- Products3/bugtracker/browser/tracker.py:1.3	Sun Jul 27 11:45:49 2003
+++ Products3/bugtracker/browser/tracker.py	Mon Jul 28 06:21:09 2003
@@ -36,14 +36,9 @@
     menu_id = "add_bugtracker"
 
     def add(self, content):
-        container = self.context
-        if not container.keys():
-            self.contentName = '1'
-        else:
-            int_ids = map(lambda id: int(id), container.keys())
-            self.contentName = str(max(int_ids)+1)
-        name = container.setObject(self.contentName, content)
-        return container[name]
+        name = self.context.setObject('', content)
+        self.contentName = name
+        return self.context[name]
 
 
 class AddBugTracker(object):