From 3c9577a2021ea7d1b7b0b61113c0cdd9283198c4 Mon Sep 17 00:00:00 2001 From: James Smith Date: Fri, 6 Sep 2024 09:53:37 +0100 Subject: [PATCH] calculate tag list before model pagination is applied resolves #2632 --- app/controllers/models_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/models_controller.rb b/app/controllers/models_controller.rb index 79df139f6..578a4365a 100644 --- a/app/controllers/models_controller.rb +++ b/app/controllers/models_controller.rb @@ -23,14 +23,14 @@ def index @models.order(name: :asc) end + @tags, @unrelated_tag_count = generate_tag_list(@models, @filter_tags) + @tags, @kv_tags = split_key_value_tags(@tags) + if helpers.pagination_settings["models"] page = params[:page] || 1 @models = @models.page(page).per(helpers.pagination_settings["per_page"]) end - @tags, @unrelated_tag_count = generate_tag_list(@models, @filter_tags) - @tags, @kv_tags = split_key_value_tags(@tags) - # Load extra data @models = @models.includes [:library, :model_files, :preview_file, :creator, :collection]