Modify ↓
#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)
Note:
See TracTickets
for help on using tickets.



Oops :-P