From d407ada02032fdc6aab5ed362fc48cd3cc95285f Mon Sep 17 00:00:00 2001 From: Jennifer Vendetti Date: Wed, 17 May 2023 14:38:34 -0700 Subject: [PATCH] Turn off cache_refresh_all on create/update Prevents Faraday::TimeoutError exceptions. See https://github.com/ncbo/ontologies_api_ruby_client/pull/9. --- app/controllers/submissions_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/submissions_controller.rb b/app/controllers/submissions_controller.rb index 69aa3032e..9407e2ca6 100644 --- a/app/controllers/submissions_controller.rb +++ b/app/controllers/submissions_controller.rb @@ -21,7 +21,7 @@ def create @ontology.summaryOnly = @submission.isRemote.eql?("3") @ontology.update - @submission_saved = @submission.save + @submission_saved = @submission.save(cache_refresh_all: false) if response_error?(@submission_saved) @errors = response_errors(@submission_saved) # see application_controller::response_errors if @errors && @errors[:uploadFilePath] @@ -56,7 +56,7 @@ def update # Update summaryOnly on ontology object @ontology.summaryOnly = @submission.isRemote.eql?("3") @ontology.update - error_response = @submission.update + error_response = @submission.update(cache_refresh_all: false) if response_error?(error_response) @errors = response_errors(error_response) # see application_controller::response_errors render 'edit'