From 339f91ab3ff3055a732a042ca5394bb57eca815a Mon Sep 17 00:00:00 2001 From: Syphax bouazzouni Date: Thu, 12 Oct 2023 22:08:12 +0200 Subject: [PATCH] fix detaching views from parent ontology on update --- app/controllers/ontologies_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/ontologies_controller.rb b/app/controllers/ontologies_controller.rb index cc473e0b3..c95ee776e 100644 --- a/app/controllers/ontologies_controller.rb +++ b/app/controllers/ontologies_controller.rb @@ -420,7 +420,7 @@ def update # Note: find_by_acronym includes ontology views @ontology = LinkedData::Client::Models::Ontology.find_by_acronym(params[:ontology][:acronym] || params[:id]).first @ontology.update_from_params(ontology_params) - @ontology.viewOf = nil if @ontology.isView.eql? "0" + @ontology.viewOf = '' if @ontology.isView.eql? "0" error_response = @ontology.update if response_error?(error_response) @categories = LinkedData::Client::Models::Category.all