#548: Simple ticket report fails ---------------------+--------------- Reporter: olemis | Owner: Type: defect | Status: new Priority: major | Version: Resolution: | ---------------------+--------------- While running the functional test suite it was noticed that the SQL statement `select * from ticket` in a report leads to the following error
{{{#!html <div class="alert">Report execution failed: <pre>Exception: Failed to translate SQL 'select * from ticket ', exception 'select'</pre> <hr><pre style="white-space: pre">select * from ticket </pre></div> }}} On the other hand the SQL statement `SELECT * FROM ticket` seems to be translated correctly but also fails with the following error {{{ UnboundLocalError: local variable 'dt' referenced before assignment }}} Traceback {{{#!py File "/path/to/bloodhound/bloodhound_dashboard/bhdashboard/widgets/templates/widget_grid.html", line 107, in <Expression u"cell.value != '' and format_time(value) or '--'"> <td class="date" py:attrs="td_attrs">${cell.value != '' and format_time(value) or '--'} File "/path/to/bloodhound/trac/trac/util/datefmt.py", line 704, in user_time return func(*args, **kwargs) File "/path/to/bloodhound/trac/trac/util/datefmt.py", line 244, in format_time return _format_datetime(t, format, tzinfo, locale, 'time') File "/path/to/bloodhound/trac/trac/util/datefmt.py", line 197, in _format_datetime t = to_datetime(t, tzinfo or localtz) File "/path/to/bloodhound/trac/trac/util/datefmt.py", line 90, in to_datetime if dt: }}} -- Ticket URL: <https://issues.apache.org/bloodhound/ticket/548> Apache Bloodhound <https://issues.apache.org/bloodhound/> The Apache Bloodhound issue tracker