mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-01 21:21:50 +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
|
end
|
||||||
|
|
||||||
def send_low_stock_notification
|
def send_low_stock_notification
|
||||||
repository_row = RepositoryRow.find(repository_cell.repository_row_id)
|
repository_row = repository_cell.repository_row
|
||||||
repository = Repository.find(repository_row.repository_id)
|
repository = repository_row.repository
|
||||||
|
|
||||||
|
return unless repository.class.name == 'Repository'
|
||||||
|
|
||||||
LowStockNotification.send_notifications({
|
LowStockNotification.send_notifications({
|
||||||
repository_row_id: repository_cell.repository_row_id,
|
repository_row_id: repository_cell.repository_row_id,
|
||||||
|
|
Loading…
Reference in a new issue