Skip to content

Commit

Permalink
Makes more sense
Browse files Browse the repository at this point in the history
  • Loading branch information
kdp-cloud committed Mar 15, 2024
1 parent 06db35b commit 0a479c0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/seek/json_metadata/attribute.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ def linked_sample_type_and_attribute_type_consistency
if sample_attribute_type && linked_sample_type && !seek_sample? && !seek_sample_multi?
errors.add(:sample_attribute_type, 'Attribute type must be SeekSample if linked sample type set')
end
if seek_sample? && linked_sample_type.nil? && is_isa_compliant_input?
if seek_sample? && linked_sample_type.nil? && !is_isa_compliant_input?
errors.add(:seek_sample, 'Linked Sample Type must be set if attribute type is Registered Sample')
elsif seek_sample_multi? && linked_sample_type.nil? && is_isa_compliant_input?
elsif seek_sample_multi? && linked_sample_type.nil? && !is_isa_compliant_input?
errors.add(:seek_sample_multi, 'Linked Sample Type must be set if attribute type is Registered Sample List')
end
end
Expand All @@ -96,9 +96,9 @@ def check_value_against_base_type(value)

def is_isa_compliant_input?
if is_a?(SampleAttribute)
!(input_attribute? && sample_type.is_isa_json_compliant?)
input_attribute? && sample_type.is_isa_json_compliant?
else
!input_attribute?
input_attribute?
end
end
end
Expand Down

0 comments on commit 0a479c0

Please sign in to comment.