mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-07 05:34:55 +08:00
Fix destroying repository rows [SCI-11015]
This commit is contained in:
parent
7f47256e3a
commit
e3a5b15180
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…
Add table
Reference in a new issue