Skip to content

Commit

Permalink
calculate tag list before model pagination is applied
Browse files Browse the repository at this point in the history
resolves #2632
  • Loading branch information
Floppy committed Sep 6, 2024
1 parent e657d14 commit 3c9577a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/models_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 3c9577a

Please sign in to comment.