[Trac-tickets] [The Trac Project] #2040: global name
'remove_contraints' is not defined ticket/query.py
The Trac Project
noreply at edgewall.com
Sat Sep 10 11:39:43 CDT 2005
#2040: global name 'remove_contraints' is not defined ticket/query.py
---------------------------+------------------------------------------------
Reporter: anonymous | Owner: jonas
Type: defect | Status: new
Priority: normal | Milestone: 0.9
Component: ticket system | Version: devel
Severity: major | Keywords: |
---------------------------+------------------------------------------------
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]
}}}
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/2040>
The Trac Project <http://trac.edgewall.com/>
More information about the Trac-Tickets
mailing list