From 3007872f5770e59149034607eb33f591b7837ef8 Mon Sep 17 00:00:00 2001 From: hevp Date: Thu, 26 Mar 2020 11:20:08 +0100 Subject: [PATCH] Limit future DOI display to when DOI generation is enabled --- b2share/modules/records/serializers/schemas/json.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/b2share/modules/records/serializers/schemas/json.py b/b2share/modules/records/serializers/schemas/json.py index 08c78f938f..adb98ad3ca 100644 --- a/b2share/modules/records/serializers/schemas/json.py +++ b/b2share/modules/records/serializers/schemas/json.py @@ -73,7 +73,7 @@ def filter_internal(self, data): g.record_hit['_source']) if '_deposit' in data['metadata']: - if hasattr(g, 'record') and is_deposit(record.model):# and current_app.config['AUTOMATICALLY_ASSIGN_DOI']: + if hasattr(g, 'record') and is_deposit(record.model) and current_app.config['AUTOMATICALLY_ASSIGN_DOI']: # add future DOI string data['metadata'].update({'future_doi': generate_doi(data['metadata']['_deposit']['id']) })