Skip to content

Commit aec0316

Browse files
committed
Fixed bug when code doi empty
1 parent 6c86832 commit aec0316

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

publish.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def update_metadata(server, token, article_id, article):
7070
data['metadata']['creators'].append(author)
7171

7272
if article.type in ["replication", "Replication"]:
73-
if article.code.doi is not None:
73+
if article.code.doi is not None and len(article.code.doi):
7474
data['metadata']['related_identifiers'].append(
7575
{'relation': 'isSupplementedBy', 'identifier': article.code.doi})
7676
# if article.replication.doi is not None:

0 commit comments

Comments
 (0)