Edgewall Software
Modify

Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#2040 closed defect (fixed)

global name 'remove_contraints' is not defined ticket/query.py

Reported by: anonymous Owned by: Christopher Lenz
Priority: normal Milestone: 0.9
Component: ticket system Version: devel
Severity: major Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I just updated the latest trunk code and recieved the following error when I clicked on the active tickets link from a milestone page. It looks like the problem orginated from the commit of [2218].

global name 'remove_contraints' is not defined
Traceback (most recent call last):
  File "/usr/lib/python2.3/site-packages/trac/web/cgi_frontend.py", line 115, in run
    dispatch_request(req.path_info, req, env)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 139, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.3/site-packages/trac/web/main.py", line 107, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.3/site-packages/trac/ticket/query.py", line 331, in process_request
    constraints = self._get_constraints(req)
  File "/usr/lib/python2.3/site-packages/trac/ticket/query.py", line 429, in _get_constraints
    if remove_contraints.has_key(field):
NameError: global name 'remove_contraints' is not defined

This patch should fix it:

Index: trac/ticket/query.py
===================================================================
--- trac/ticket/query.py        (revision 2218)
+++ trac/ticket/query.py        (working copy)
@@ -426,7 +426,7 @@
                 mode = req.args.get(field + '_mode')
                 if mode:
                     vals = map(lambda x: mode + x, vals)
-                if remove_contraints.has_key(field):
+                if remove_constraints.has_key(field):
                     idx = remove_constraints[field]
                     if idx >= 0:
                         del vals[idx]

Attachments (0)

Change History (2)

comment:1 by Christopher Lenz, 19 years ago

Owner: changed from Jonas Borgström to Christopher Lenz
Status: newassigned

Oops :-P

comment:2 by Christopher Lenz, 19 years ago

Resolution: fixed
Status: assignedclosed

Fixed in [2221]. Thanks.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christopher Lenz.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christopher Lenz to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.