Skip to content

Commit

Permalink
remove explicit autosave on assay_assets and observation_unit_assets …
Browse files Browse the repository at this point in the history
…associations #1981

setting to true has a slightly different meaning to it being undeclared
  • Loading branch information
stuzart committed Sep 17, 2024
1 parent ee3b643 commit 512a6c5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/assay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Assay < ApplicationRecord
has_many :tissue_and_cell_types, through: :assay_organisms

before_save { assay_assets.each(&:set_version) }
has_many :assay_assets, dependent: :destroy, inverse_of: :assay, autosave: true
has_many :assay_assets, dependent: :destroy, inverse_of: :assay

has_many :data_files, through: :assay_assets, source: :asset, source_type: 'DataFile', inverse_of: :assays
has_many :placeholders, through: :assay_assets, source: :asset, source_type: 'Placeholder', inverse_of: :assays
Expand Down
2 changes: 1 addition & 1 deletion app/models/observation_unit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ObservationUnit < ApplicationRecord
has_one :investigation, through: :study
has_many :samples
has_many :related_assays, -> { distinct }, through: :samples, source: :assays
has_many :observation_unit_assets, inverse_of: :observation_unit, dependent: :delete_all, autosave: true
has_many :observation_unit_assets, inverse_of: :observation_unit, dependent: :delete_all
has_many :data_files, through: :observation_unit_assets, source: :asset, source_type: 'DataFile', inverse_of: :observation_units
has_many :assay_data_files, -> { distinct }, through: :related_assays, source: :data_files
has_many :assay_sops, -> { distinct }, through: :related_assays, source: :sops
Expand Down

0 comments on commit 512a6c5

Please sign in to comment.