mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Merge pull request #7839 from artoscinote/ma_SCI_11015
Fix destroying repository rows [SCI-11015]
This commit is contained in:
commit
79409830af
1 changed files with 5 additions and 0 deletions
|
@ -98,6 +98,11 @@ class RepositoryRow < ApplicationRecord
|
|||
class_name: 'RepositoryRow',
|
||||
source: :parent,
|
||||
dependent: :destroy
|
||||
has_many :discarded_storage_location_repository_rows,
|
||||
-> { discarded },
|
||||
class_name: 'StorageLocationRepositoryRow',
|
||||
inverse_of: :repository_row,
|
||||
dependent: :destroy
|
||||
has_many :storage_location_repository_rows, inverse_of: :repository_row, dependent: :destroy
|
||||
has_many :storage_locations, through: :storage_location_repository_rows
|
||||
|
||||
|
|
Loading…
Reference in a new issue