[CMF-checkins] CVS: CMF/CMFCollector - Collector.py:1.20
Ken Manheimer
klm@zope.com
Thu, 15 Nov 2001 18:00:51 -0500
Update of /cvs-repository/CMF/CMFCollector
In directory cvs.zope.org:/tmp/cvs-serv14447
Modified Files:
Collector.py
Log Message:
.add_issue(): Propagate the result value from addCollectorIssue(),
along with the new id.
=== CMF/CMFCollector/Collector.py 1.19 => 1.20 ===
submitter_id = str(getSecurityManager().getUser())
- addCollectorIssue(self,
- id,
- title=title,
- description=description,
- submitter_id=submitter_id,
- submitter_name=submitter_name,
- submitter_email=submitter_email,
- kibitzers=kibitzers,
- topic=topic,
- classification=classification,
- security_related=security_related,
- importance=importance,
- version_info=version_info,
- assignees=assignees,
- file=file, fileid=fileid, filetype=filetype)
- return id
+ err = addCollectorIssue(self,
+ id,
+ title=title,
+ description=description,
+ submitter_id=submitter_id,
+ submitter_name=submitter_name,
+ submitter_email=submitter_email,
+ kibitzers=kibitzers,
+ topic=topic,
+ classification=classification,
+ security_related=security_related,
+ importance=importance,
+ version_info=version_info,
+ assignees=assignees,
+ file=file, fileid=fileid, filetype=filetype)
+ return id, err
security.declareProtected(ManageCollector, 'edit')
@@ -216,6 +216,13 @@
if email is not None and self.email != email:
self.email = email
changes.append("Email")
+ if not self.email:
+ raise ValueError, ('<strong>'
+ '<font color="red">'
+ 'The collector <em>must</em>'
+ ' have an email address'
+ '</font>'
+ '</strong>')
if managers is not None or not self.managers:
# XXX Vette managers - they must exist, etc.
x = filter(None, managers)