#801: WebSearch: fix sorting exceptions
-----------------------+-----------------
 Reporter:  simko      |      Owner:
     Type:  defect     |     Status:  new
 Priority:  major      |  Milestone:
Component:  WebSearch  |    Version:
 Keywords:             |
-----------------------+-----------------
 Wrong sorting options lead to exceptions like:

 {{{
 uri: </search?p=ellis&sf=1>

 [...]

   File "/usr/local/lib/python2.6/dist-packages/invenio/search_engine.py",
 line 3523, in sort_records
     vals.extend(get_fieldvalues(recID, tag))
   File "/usr/local/lib/python2.6/dist-
 packages/invenio/search_engine_utils.py", line 71, in get_fieldvalues
     res = run_sql(query, tuple(queryparam) + (tag,))
   File "/usr/local/lib/python2.6/dist-packages/invenio/dbquery.py", line
 189, in run_sql
     rc = cur.execute(sql, param)
   File "/usr/lib/pymodules/python2.6/MySQLdb/cursors.py", line 166, in
 execute
     self.errorhandler(self, exc, value)
   File "/usr/lib/pymodules/python2.6/MySQLdb/connections.py", line 35, in
 defaulterrorhandler
     raise errorclass, errorvalue
 ProgrammingError: (1146, "Table 'invenio.bib1x' doesn't exist")
 }}}

 The sort arguments should be properly washed.

-- 
Ticket URL: <http://invenio-software.org/ticket/801>
Invenio <http://invenio-software.org>

Reply via email to