mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-29 19:51:01 +08:00
Fix stock notifications on snapshots [SCI-9872]
This commit is contained in:
parent
ea4eb6f785
commit
8748051a0f
1 changed files with 4 additions and 2 deletions
|
@ -203,8 +203,10 @@ class RepositoryStockValue < ApplicationRecord
|
|||
end
|
||||
|
||||
def send_low_stock_notification
|
||||
repository_row = RepositoryRow.find(repository_cell.repository_row_id)
|
||||
repository = Repository.find(repository_row.repository_id)
|
||||
repository_row = repository_cell.repository_row
|
||||
repository = repository_row.repository
|
||||
|
||||
return unless repository.class.name == 'Repository'
|
||||
|
||||
LowStockNotification.send_notifications({
|
||||
repository_row_id: repository_cell.repository_row_id,
|
||||
|
|
Loading…
Reference in a new issue