def search_results_sorted(self, key, document_list, reverse=False):
        if document_list:
            values_list = []
            empty_values_list = []
            documents = self.get_sorting_docs_indexes(document_list)
            # Selecting proper sorting couch query params
            if key in ["metadata_created_date", "metadata_description", "metadata_doc_type_rule_id"]:
                doc_field = key
            else:
                doc_field = 'mdt_indexes'
            # Creating special, sorting capable list of tuples (Docname, Sorting field value)
            for doc in documents:
                if doc_field == 'mdt_indexes':
                    if key in doc[doc_field]:
                        value = doc[doc_field][key]
                    else:
                        value = ''
                else:
                    value = doc[key]
                if value:
                    values_list.append((doc.get_id, value))
                else:
                    empty_values_list.append(doc.get_id)
            try:
                document_list = sorted(values_list, key=itemgetter(1), reverse=reverse)
                document_list = map(lambda doc: doc[0],  document_list)
                document_list = document_list + empty_values_list
            except TypeError, e:
                log.error('sorting TypeError error in indexes: %s, in documents_list: %s' % (e, document_list))
                pass
        return document_list
If _getexif returns None, don't fail.
dataset/ETHPy150Open adlibre/Adlibre-DMS/adlibre_dms/apps/core/search.py/DMSSearchManager.search_results_sorted--crossover with--dataset/ETHPy150Open ofa/connect/open_connect/media/tests/test_models.py/ImageTest.test_process_exif_getexif_returns_none