Skip to content

Commit

Permalink
fix properties tests
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed Aug 1, 2024
1 parent 30c3025 commit 2750118
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions controllers/properties_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class PropertiesController < ApplicationController
get '/:property' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
reply 200, p
end
Expand All @@ -51,7 +51,7 @@ class PropertiesController < ApplicationController
get '/:property/tree' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
root_tree = p.tree

Expand Down Expand Up @@ -79,7 +79,7 @@ class PropertiesController < ApplicationController
get '/:property/ancestors' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
ancestors = p.ancestors
p.class.in(submission).models(ancestors).include(:label, :definition).all
Expand All @@ -91,7 +91,7 @@ class PropertiesController < ApplicationController
get '/:property/descendants' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?
descendants = p.descendants
p.class.in(submission).models(descendants).include(:label, :definition).all
Expand All @@ -103,7 +103,7 @@ class PropertiesController < ApplicationController
get '/:property/parents' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?

p.bring(:parents)
Expand All @@ -120,7 +120,7 @@ class PropertiesController < ApplicationController
get '/:property/children' do
prop = params[:property]
ont, submission = get_ontology_and_submission
p = ont.property(prop, submission)
p = ont.property(prop, submission, display_all_attributes: false)
error 404, "Property #{prop} not found in ontology #{ont.id.to_s}" if p.nil?

p.bring(:children)
Expand Down

0 comments on commit 2750118

Please sign in to comment.