From 2b28f50e784026a50c670da6f3a5711bf7123d13 Mon Sep 17 00:00:00 2001 From: alejandromumo Date: Fri, 6 Dec 2024 11:19:20 +0100 Subject: [PATCH] bibtex: add trailing comma in url field --- invenio_rdm_records/resources/serializers/bibtex/schema.py | 2 +- tests/resources/serializers/test_bibtex_serializer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/invenio_rdm_records/resources/serializers/bibtex/schema.py b/invenio_rdm_records/resources/serializers/bibtex/schema.py index da4372df1..e80f2aa28 100644 --- a/invenio_rdm_records/resources/serializers/bibtex/schema.py +++ b/invenio_rdm_records/resources/serializers/bibtex/schema.py @@ -269,7 +269,7 @@ def _format_output_row(self, field, value): elif field == "month": out = " {0:<12} = {1},\n".format(field, value) elif field == "url": - out = " {0:<12} = {{{1}}}\n".format(field, value) + out = " {0:<12} = {{{1}}},\n".format(field, value) else: if not isinstance(value, list) and value.isdigit(): out = " {0:<12} = {1},\n".format(field, value) diff --git a/tests/resources/serializers/test_bibtex_serializer.py b/tests/resources/serializers/test_bibtex_serializer.py index 170881fdd..5d2d54610 100644 --- a/tests/resources/serializers/test_bibtex_serializer.py +++ b/tests/resources/serializers/test_bibtex_serializer.py @@ -74,7 +74,7 @@ def test_bibtex_serializer_full_record(running_app, updated_full_record): " publisher = {InvenioRDM},\n" " version = {v1.0},\n" " doi = {10.1234/12345-abcde},\n" - " url = {https://doi.org/10.1234/12345-abcde}\n" + " url = {https://doi.org/10.1234/12345-abcde},\n" "}" )