mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-30 11:41:19 +08:00
Merge pull request #3736 from okriuchykhin/ok_SCI_6348
Improve performance of repository cells index in the API [SCI-6348]
This commit is contained in:
commit
381be79f10
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