~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/projectservice.py

  • Committer: William Grant
  • Date: 2009-05-13 03:15:26 UTC
  • mto: This revision was merged to the branch mainline in revision 1247.
  • Revision ID: grantw@unimelb.edu.au-20090513031526-l3knlkpgnldp6dgj
Attempting to view an SVN log when the repo is empty will not crash now.

svnlogservice now returns a 404 if the revision isn't found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    
30
30
    Add new, delete, edit functionality is given here."""
31
31
    template = "templates/projectset_fragment.html"
 
32
    
 
33
    def __init__(self, req, subject, year, semester, projectset):
 
34
        self.context = req.store.find(ProjectSet,
 
35
            ProjectSet.id == int(projectset),
 
36
            ProjectSet.offering_id == Offering.id,
 
37
            Offering.subject_id == Subject.id,
 
38
            Subject.short_name == unicode(subject),
 
39
            Offering.semester_id == Semester.id,
 
40
            Semester.year == unicode(year),
 
41
            Semester.semester == unicode(semester)).one()
 
42
        
 
43
        if self.context is None:
 
44
            raise NotFound()
32
45
 
33
46
    def _project_url(self, project):
34
47
        return "/subjects/%s/%s/%s/+projects/%s" % \