Skip to content

Commit

Permalink
documents: check for pdf in key
Browse files Browse the repository at this point in the history
  • Loading branch information
PascalEgn committed Nov 20, 2023
1 parent 6f7a368 commit c25d5aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inspirehep/modules/workflows/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def wrapper(*args, **kwargs):
@with_debug_logging
def get_document_url_for_reference_extraction(obj):
documents = obj.data.get("documents", [])
fulltexts = [document for document in documents if document.get("fulltext")]
fulltexts = [document for document in documents if (document.get("fulltext") and document.get("key", "").endswith(".pdf"))]
documents = fulltexts or documents

if not documents:
Expand Down

0 comments on commit c25d5aa

Please sign in to comment.