mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-27 02:04:33 +08:00
Merge pull request #6386 from rekonder/aj_SCI_9484
Fix unsharing of repository rows [SCI-9484]
This commit is contained in:
commit
efa0149c9f
2 changed files with 7 additions and 7 deletions
|
@ -14,7 +14,7 @@ class MyModuleRepositoryRow < ApplicationRecord
|
|||
touch: true,
|
||||
inverse_of: :my_module_repository_rows
|
||||
belongs_to :repository_stock_unit_item, optional: true
|
||||
has_many :repository_ledger_records, as: :reference, dependent: :nullify
|
||||
has_many :repository_ledger_records, as: :reference
|
||||
|
||||
validates :repository_row, uniqueness: { scope: :my_module }
|
||||
|
||||
|
|
|
@ -75,13 +75,13 @@ module RepositoryStockLedgerZipExport
|
|||
]
|
||||
breadcrumbs_data = Array.new(5)
|
||||
if consumption_type == 'Task'
|
||||
my_module = record.my_module_repository_row.my_module
|
||||
my_module = record.my_module_repository_row&.my_module
|
||||
breadcrumbs_data = [
|
||||
my_module.experiment.project.team.name,
|
||||
my_module.experiment.project.name,
|
||||
my_module.experiment.name,
|
||||
my_module.name,
|
||||
my_module.code
|
||||
my_module&.experiment&.project&.team&.name,
|
||||
my_module&.experiment&.project&.name,
|
||||
my_module&.experiment&.name,
|
||||
my_module&.name,
|
||||
my_module&.code
|
||||
]
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue