CDS INVENIO: Check if record belongs to any collection

A record can be in “Processing” state (and show an orange warning) like this one:

cds invenio "processing" record

This “RESTRICTED: Processing record” warning shows up in two scenarios:
1) When the record belongs to restricted collections (get_restricted_collections_for_recid function returns some colls)
2) When the record is NOT in any collection. (is_record_in_any_collection function returns false)

Here is a quick script that checks which records do not belong to any collection.

from invenio.search_engine import \
                 get_restricted_collections_for_recid, \
for i in range(40000,45000):   # check records from 40000 to 45000
    if not is_record_in_any_collection(i):
        print "El registro %s no tiene col" %i

Leave a Reply

Your email address will not be published. Required fields are marked *

Post Navigation