Skip to content

Commit

Permalink
remove peer review setting if not allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamelers committed Mar 20, 2024
1 parent dba613e commit c845402
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/controllers/stash_datacite/resources_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ def review
check_required_fields(@resource)
@review = Resource::Review.new(@resource)
@resource.has_geolocation = @review.geolocation_data?
unless @resource.identifier.allow_review? && @resource.previous_curated_resource.blank? && @resource.curation_start_date.blank?
@resource.hold_for_peer_review = false
@resource.peer_review_end_date = nil
end
@resource.save!
end
end
Expand Down
2 changes: 1 addition & 1 deletion app/views/stash_datacite/peer_review/_review.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if @resource.identifier.allow_review? && @resource.previous_curated_resource.nil? && @resource.curation_start_date.nil? %>
<% if @resource.identifier.allow_review? && @resource.previous_curated_resource.blank? && @resource.curation_start_date.blank? %>
<!-- This is only available if the id has not been curated AND
the associated journal allows a review workflow -->
<div>
Expand Down

0 comments on commit c845402

Please sign in to comment.