Edgewall Software
Modify

Ticket #2040 (closed defect: fixed)

Opened 6 years ago

Last modified 6 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:
Release Notes:
API 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

Change History

comment:1 Changed 6 years ago by cmlenz

  • Owner changed from jonas to cmlenz
  • Status changed from new to assigned

Oops :-P

comment:2 Changed 6 years ago by cmlenz

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in [2221]. Thanks.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cmlenz. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.