#621: BatchUploader: fix retrieval of recs from extoaiid
-----------------------+----------------------
Reporter: lmarian | Owner: jmartinm
Type: defect | Status: new
Priority: major | Milestone:
Component: BibUpload | Version:
Keywords: |
-----------------------+----------------------
In `batchuploader_engine.py`, the
`_detect_collections_from_marcxml_file(recs)` function assumes that the
result of `find_records_from_extoaiid(tag_oaiid)` function is a recid,
while this function actually returns an intbitset of recids or throws an
error.
This should be fixed by handling an intbitset instead of a recid, and also
maybe catching the error, something in the same line as in `bibupload.py`:
{{{
try:
rec_ids = find_records_from_extoaiid(extoaiid, extoaisrc)
except Error, e:
write_message(e, verbose=1, stream=sys.stderr)
return -1
if rec_ids:
# rec_id found
rec_id = rec_ids.pop()
}}}
--
Ticket URL: <https://invenio-software.org/ticket/621>
Invenio <http://invenio-software.org>