Skip to content

Commit

Permalink
Make sure vanilla assays and studies can be deleted.
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin De Pelseneer authored and stuzart committed Oct 10, 2023
1 parent 17f4f99 commit 55ca8b1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/controllers/assays_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def create

def delete_linked_sample_types
return unless is_single_page_assay?
return if @assay.sample_type.nil?

@assay.sample_type.destroy
end
Expand Down
1 change: 1 addition & 0 deletions app/controllers/studies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ def update

def delete_linked_sample_types
return unless is_single_page_study?
return if @study.sample_types.empty?

# The study sample types must be destroyed in reversed order
# otherwise the first sample type won't be removed becaused it is linked from the second
Expand Down

0 comments on commit 55ca8b1

Please sign in to comment.