Opened 8 years ago
Last modified 8 years ago
#12286 closed defect
QueryValueError: Invalid query constraint value — at Initial Version
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
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..6ef8d31 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 return system_message(e) 1386 1390 1387 1391 if format == 'table': 1388 1392 data = query.template_data(formatter.context, tickets,
Note:
See TracTickets
for help on using tickets.