Skip to content

Commit

Permalink
Turn off cache_refresh_all on create/update
Browse files Browse the repository at this point in the history
Prevents Faraday::TimeoutError exceptions. See ncbo/ontologies_api_ruby_client#9.
  • Loading branch information
jvendetti committed May 20, 2023
1 parent 72ccf83 commit d407ada
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/submissions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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'
Expand Down

0 comments on commit d407ada

Please sign in to comment.