mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Infinite loading broken on group members list (#23214)
This regressed in 5a99243629 where
the condition to load more members into the list on the client side was
inverted.
This commit is contained in:
committed by
GitHub
parent
7c12f7d50a
commit
8d72a51ae1
@@ -230,14 +230,15 @@ class GroupsController < ApplicationController
|
||||
render "posts/latest", formats: [:rss]
|
||||
end
|
||||
|
||||
MEMBERS_LIMIT = 1_000
|
||||
MEMBERS_MAX_PAGE_SIZE = 1_000
|
||||
MEMBERS_DEFAULT_PAGE_SIZE = 50
|
||||
|
||||
def members
|
||||
group = find_group(:group_id)
|
||||
|
||||
guardian.ensure_can_see_group_members!(group)
|
||||
|
||||
limit = fetch_limit_from_params(default: 50, max: MEMBERS_LIMIT)
|
||||
limit = fetch_limit_from_params(default: MEMBERS_DEFAULT_PAGE_SIZE, max: MEMBERS_MAX_PAGE_SIZE)
|
||||
offset = params[:offset].to_i
|
||||
|
||||
raise Discourse::InvalidParameters.new(:offset) if offset < 0
|
||||
|
||||
Reference in New Issue
Block a user