diff --git a/app/controllers/dois_controller.rb b/app/controllers/dois_controller.rb index 5301a3332..5f69ad8f0 100644 --- a/app/controllers/dois_controller.rb +++ b/app/controllers/dois_controller.rb @@ -351,7 +351,7 @@ def random def get_url authorize! :get_url, @doi - if @doi.aasm_state == "draft" + if !@doi.is_registered_or_findable? || %w(europ ethz).include?(@doi.provider_id) || %w(Crossref).include?(@doi.agency) url = @doi.url head :no_content and return unless url.present? else