Edgewall Software

Changes between Version 10 and Version 11 of CookBook/Configuration/SignedTickets


Ignore:
Timestamp:
May 8, 2017, 12:23:15 AM (2 years ago)
Author:
Ryan J Ollos
Comment:

Handle case of permission check on non-existent ticket. The timeline was not viewable when an event contained a TracLink to a non-existent ticket.

Legend:

Unmodified
Added
Removed
Modified
  • CookBook/Configuration/SignedTickets

    v10 v11  
    5858from trac.core import *
    5959from trac.perm import IPermissionPolicy
     60from trac.resource import ResourceNotFound
    6061from trac.ticket.model import Ticket
    6162
     
    7576            return None
    7677
    77         t = Ticket(self.env, resource.id)
    78         if t['status'] == 'closed' and t['resolution'] == 'signed':
    79             return False
     78        try:
     79            t = Ticket(self.env, resource.id)
     80        except ResourceNotFound:
     81            pass
     82        else:
     83            if t['status'] == 'closed' and t['resolution'] == 'signed':
     84                return False
    8085}}}
    8186