Skip to content

Commit

Permalink
Limit future DOI display to when DOI generation is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
hevp committed Mar 26, 2020
1 parent 22e0e64 commit 3007872
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion b2share/modules/records/serializers/schemas/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']) })

Expand Down

0 comments on commit 3007872

Please sign in to comment.