diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-10-04 15:57:05 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2022-10-04 15:57:05 +0200 |
commit | 976d12a61155fcec3224a06ad1a50c8337a3af7e (patch) | |
tree | a2c61ee3e3847b221cc99837e1329ec042b7f879 | |
parent | 744139f8dbb38935a79e068c724a32f855008831 (diff) |
In the example openlibrary template, use isbn_10 if there is no isbn_13
-rw-r--r-- | docs/examples/books/templates/from_openlibrary.yaml | 2 |
1 files changed, 1 insertions, 1 deletions
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 }} |