Fix stock notifications on snapshots [SCI-9872]

This commit is contained in:
Anton 2023-12-12 12:32:00 +01:00
parent ea4eb6f785
commit 8748051a0f

View file

@ -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,