Edgewall Software

Ticket #2040 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

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

Reported by: anonymous Owned by: cmlenz
Priority: normal Milestone: 0.9
Component: ticket system Version: devel
Severity: major Keywords:
Cc:

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

Change History

Changed 3 years ago by cmlenz

  • owner changed from jonas to cmlenz
  • status changed from new to assigned

Oops :-P

Changed 3 years ago by cmlenz

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in [2221]. Thanks.

Add/Change #2040 (global name 'remove_contraints' is not defined ticket/query.py)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.