mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-22 14:54:38 +08:00
Merge pull request #6806 from aignatov-bio/ai-sci-9872-fix-stock-notification-on-snapshot
Fix stock notifications on snapshots [SCI-9872]
This commit is contained in:
commit
442b41fafe
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