Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamelers committed Mar 20, 2024
1 parent c845402 commit 41b178a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/controllers/stash_datacite/publications_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,10 @@ def save_form_to_internal_data
@msid = manage_internal_datum(identifier: @se_id, data_type: 'manuscriptNumber', value: parsed_msid)
end

if @resource.identifier.allow_review? && @resource.previous_curated_resource.blank? && @resource.curation_start_date.blank?
# if the newly-set journal wants PPR by default, set the PPR value for this resource
@resource.update(hold_for_peer_review: @se_id.journal&.default_to_ppr)
if @resource.identifier.allow_review? && @resource.previous_curated_resource.blank? &&
@resource.curation_start_date.blank? && @se_id.journal&.default_to_ppr?
# if the newly-set journal wants PPR by default, and it is allowed, set the PPR value for this resource
@resource.update(hold_for_peer_review: @se_id.journal.default_to_ppr)
end

save_doi
Expand Down

0 comments on commit 41b178a

Please sign in to comment.