[Zope-CVS] CVS: Packages/JobBoardEx - ApproveJobsView.py:1.4
Guido van Rossum
guido@python.org
Fri, 14 Jun 2002 11:15:17 -0400
Update of /cvs-repository/Packages/JobBoardEx
In directory cvs.zope.org:/tmp/cvs-serv29119
Modified Files:
ApproveJobsView.py
Log Message:
Repair the action for 'discard'. This doesn't work yet, but I think
I'll have to fix the security proxy code first.
=== Packages/JobBoardEx/ApproveJobsView.py 1.3 => 1.4 ===
class ApproveJobsView(BrowserView):
- form = ViewPageTemplateFile('ApproveJobs.pt')
+ form = ViewPageTemplateFile('ApproveJobs.pt')
def action(self):
form = self.request.form
- for variable in form:
+ for jobid in form:
try:
- job = self.context[variable]
+ job = self.context[jobid]
except KeyError:
raise
except:
continue
- action = form[variable]
+ action = form[jobid]
if action == 'approve':
job.approve()
elif action == 'discard':
- self.context.remove(job)
+ del self.context[jobid]
self.request.getResponse().redirect('approveForm.html')