#668: Negative integers for ticket IDs ---------------------------+----------------------------------- Reporter: olemis | Owner: olemis Type: defect | Status: accepted Priority: blocker | Milestone: Release 8 Component: multiproduct | Version: Resolution: | Keywords: bep-0010 , postgresql ---------------------------+-----------------------------------
Comment (by rjollos): It looks like the `UnboundLocalError` may just be a side-effect of the ticket not existing. Perhaps we should push this patch to Trac: {{{#!diff diff --git a/trac/trac/ticket/notification.py b/trac/trac/ticket/notification.py index 2de8ec9..5c52982 100644 --- a/trac/trac/ticket/notification.py +++ b/trac/trac/ticket/notification.py @@ -80,6 +80,7 @@ def get_ticket_notification_recipients(env, config, tktid, prev_cc): ccrecipients = prev_cc torecipients = [] + reporter = owner = None with env.db_query as db: # Harvest email addresses from the cc, reporter, and owner fields for row in db("SELECT cc, reporter, owner FROM ticket WHERE id=%s", }}} Note however that I'm reworking the entire function in trac:#2311 (proposed stages are changed, but I'm doing some additional refactoring before pushing them), which may prevent issues such as this. -- Ticket URL: <https://issues.apache.org/bloodhound/ticket/668#comment:12> Apache Bloodhound <https://issues.apache.org/bloodhound/> The Apache Bloodhound issue tracker