Fix inventory snapshot loading in full view [SCI-11168] (#7954)

This commit is contained in:
Alex Kriuchykhin 2024-10-09 15:10:35 +02:00 committed by GitHub
parent a03bd8e4ec
commit 63a470a8ac
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -20,6 +20,8 @@ class RepositorySnapshotDatatableService < RepositoryDatatableService
repository_rows = fetch_rows(search_value).preload(Extends::REPOSITORY_ROWS_PRELOAD_RELATIONS)
repository_rows = repository_rows.preload(:repository_columns, repository_cells: { value: @repository.cell_preload_includes }) if @preload_cells
repository_rows = repository_rows.preload(:repository_stock_cell, :repository_stock_value) if @repository.has_stock_management?
# don't load reminders for snapshots
repository_rows = repository_rows.select('FALSE AS has_active_reminders') if Repository.reminders_enabled?
sort_rows(order_by_column, repository_rows)
end