[Zope-CVS] CVS: Packages/JobBoardEx - ApproveJobs.pt:1.9 ApproveJobsView.py:1.3 JobCreateView.py:1.2 JobList.py:1.13

Jim Fulton jim@zope.com
Tue, 11 Jun 2002 19:22:40 -0400


Update of /cvs-repository/Packages/JobBoardEx
In directory cvs.zope.org:/tmp/cvs-serv12601

Modified Files:
	ApproveJobs.pt ApproveJobsView.py JobCreateView.py JobList.py 
Log Message:
Fixed some bugs I missed before, especially a missed lookup call.

Had to make __getitem__ a bit more careful to return a key error.


=== Packages/JobBoardEx/ApproveJobs.pt 1.8 => 1.9 ===
     <tr><td colspan="3">
         <input type="submit" value="Submit">
-        <a href="index.html">Back to summary</a>
+        <a href=".">Back to summary</a>
     </td></tr>
     </table>
     </form>


=== Packages/JobBoardEx/ApproveJobsView.py 1.2 => 1.3 ===
         for variable in form:
             try:
-                job = self.context.lookup(id)
+                job = self.context[variable]
             except KeyError:
                 raise
             except:


=== Packages/JobBoardEx/JobCreateView.py 1.1 => 1.2 ===
         job = Job('', summary, '', '')
         self.context.add(job)
-        self.request.getResponse().redirect('index.html')
+        self.request.getResponse().redirect('.')
         


=== Packages/JobBoardEx/JobList.py 1.12 => 1.13 ===
 
     def __getitem__(self, jobid):
-        jobid = int(jobid)
+        try:
+            jobid = int(jobid)
+        except:
+            raise KeyError, jobid
         
         for job in self.jobs:
             if job.id == jobid:
@@ -37,3 +40,9 @@
 
     def getApprovedJobs(self):
         return self.query(JobState.Approved)
+
+
+
+
+
+