Modify ↓
#12286 closed defect (fixed)
QueryValueError: Invalid query constraint value
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.10 |
Component: | ticket system | Version: | |
Severity: | normal | Keywords: | query |
Cc: | Branch: | ||
Release Notes: |
|
||
API Changes: | |||
Internal Changes: |
Description (last modified by )
18:13:18 Trac[formatter] ERROR: Macro TicketQuery(created=2012. 10. 18...2012. 10. 19.) failed: Traceback (most recent call last): File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/formatter.py", line 789, in _macro_formatter return macro.ensure_inline(macro.process(args)) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/formatter.py", line 358, in process text = self.processor(text) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/wiki/formatter.py", line 345, in _macro_processor text) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/ticket/query.py", line 1385, in expand_macro tickets = query.execute(req) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/ticket/query.py", line 300, in execute sql, args = self.get_sql(req, cached_ids, authname, tzinfo, locale) File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/ticket/query.py", line 688, in get_sql raise QueryValueError(errors) QueryValueError: Invalid query constraint value
I propose the following the following change:
-
trac/ticket/query.py
diff --git a/trac/ticket/query.py b/trac/ticket/query.py index 9b09fa7..8cf765d 100644
a b from trac.web.chrome import (INavigationContributor, Chrome, 46 46 add_script_data, add_stylesheet, add_warning, 47 47 web_context) 48 48 from trac.wiki.api import IWikiSyntaxProvider 49 from trac.wiki.formatter import system_message 49 50 from trac.wiki.macros import WikiMacroBase # TODO: should be moved in .api 50 51 51 52 … … class TicketQueryMacro(WikiMacroBase): 1382 1383 cnt, query=query_string) 1383 1384 return tag.span(cnt, title=title, class_='query_count') 1384 1385 1385 tickets = query.execute(req) 1386 try: 1387 tickets = query.execute(req) 1388 except QueryValueError, e: 1389 self.log.warn(e) 1390 return system_message(_("Error executing TicketQuery macro"), e) 1386 1391 1387 1392 if format == 'table': 1388 1393 data = query.template_data(formatter.context, tickets,
Attachments (0)
Change History (2)
comment:1 by , 9 years ago
Description: | modified (diff) |
---|
comment:2 by , 9 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Committed to 1.0-stable in [14380], merged to trunk in [14381:14382].