Skip to content

Commit

Permalink
Merge pull request #4331 from PascalEgn/require-document-pdf
Browse files Browse the repository at this point in the history
documents: check for pdf in key
  • Loading branch information
drjova authored Nov 20, 2023
2 parents b91d41a + c25d5aa commit 7801a15
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 7801a15

Please sign in to comment.