#653: BibAuthorID: fix tracebacks due to missing record information
-------------------------+-----------------
 Reporter:  simko        |      Owner:
     Type:  defect       |     Status:  new
 Priority:  critical     |  Milestone:
Component:  BibAuthorID  |    Version:
 Keywords:               |
-------------------------+-----------------
 BibAuthorID sometimes trace backs when trying to access information that
 is supposed to exist (such as title field) but that is actually missing in
 the real record.

 Example no. 1:

 {{{
 uri: </person/R.J.Crewther.1?open_claim=True>
 [...]
   File "/usr/lib64/python2.4/site-
 packages/invenio/bibauthorid_templates.py", line 839, in tmpl_admin_tabs
     title = get_fieldvalues(int(bibrec), "245__a")[0]
 IndexError: list index out of range
 }}}

 Example no. 2:

 {{{
 uri: </author/Jaiswal, P.?recid=898211&ln=en>
 [...]
 File "/usr/lib/python2.4/site-packages/invenio/websearch_webinterface.py",
 line 408, in __call__
     ptitle = get_record(recid)['245'][0][0][0][1]
 KeyError: '245'
 }}}

 Accesses to title and other such record information should be handled more
 defensively.

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

Reply via email to