mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-29 03:01:58 +08:00
Improve performance of repository cells index in the API [SCI-6348]
This commit is contained in:
parent
9ff71ad651
commit
153d1309b7
1 changed files with 1 additions and 1 deletions
|
@ -12,7 +12,7 @@ module Api
|
|||
|
||||
def index
|
||||
cells = @inventory_item.repository_cells
|
||||
.preload(value: @inventory.cell_preload_includes)
|
||||
.preload(:repository_column, value: @inventory.cell_preload_includes)
|
||||
.page(params.dig(:page, :number))
|
||||
.per(params.dig(:page, :size))
|
||||
render jsonapi: cells, each_serializer: InventoryCellSerializer
|
||||
|
|
Loading…
Reference in a new issue