Skip to content

Commit

Permalink
check if samples instead of returning false
Browse files Browse the repository at this point in the history
  • Loading branch information
kdp-cloud committed Oct 22, 2024
1 parent 60763a1 commit d107a7b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/seek/samples/sample_type_editing_constraints.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def allow_required?(attr)
attr = attr.accessor_name
end

return false unless attr
return !samples? unless attr
return !blanks?(attr) if samples?

true
Expand Down Expand Up @@ -56,7 +56,7 @@ def allow_name_change?(attr)

attr = attr.accessor_name
end
return false unless attr
return !samples? unless attr
return samples.all?(&:can_edit?) if samples?

true
Expand Down

0 comments on commit d107a7b

Please sign in to comment.