From 976d12a61155fcec3224a06ad1a50c8337a3af7e Mon Sep 17 00:00:00 2001 From: Elena ``of Valhalla'' Grandi Date: Tue, 4 Oct 2022 15:57:05 +0200 Subject: In the example openlibrary template, use isbn_10 if there is no isbn_13 --- docs/examples/books/templates/from_openlibrary.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs/examples/books') diff --git a/docs/examples/books/templates/from_openlibrary.yaml b/docs/examples/books/templates/from_openlibrary.yaml index 2fab669..e1d8d25 100644 --- a/docs/examples/books/templates/from_openlibrary.yaml +++ b/docs/examples/books/templates/from_openlibrary.yaml @@ -10,7 +10,7 @@ publisher: '{{ edition.publishers | join(", ") }}' edition: '' copyright_year: [] publication_year: {{ pub_date.year }} -isbn: '{{ edition.isbn_13.0 }}' +isbn: '{% if edition.isbn_13 %}{{ edition.isbn_13.0 }}{% else %}{% if edition.isbn_10 %}{{ edition.isbn_10.0 }}{% endif %}{% endif %}' lccn: '' openlibrary: 'https://openlibrary.org{{ edition.key }}' pages: {{ edition.number_of_pages }} -- cgit v1.2.3