mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed member count for limit checks when publishing sometimes being incorrect (#16667)
no issue - the members stats service was being used for the total member count when checking member limits for publishing but the stats service is not always correct which could result in publishing being blocked unexpectedly - switched to using the total count from a `/members/` query which should always be correct/match other counts within the UI
This commit is contained in:
parent
2738d25cc6
commit
59c6f9d28a
1 changed files with 3 additions and 2 deletions
|
@ -93,9 +93,10 @@ export default class LimitsService extends Service {
|
|||
}
|
||||
|
||||
async getMembersCount() {
|
||||
const counts = await this.membersStats.fetchCounts();
|
||||
const members = await this.store.query('member', {limit: 'all'});
|
||||
const total = members.meta.pagination.total;
|
||||
|
||||
return counts.total;
|
||||
return total;
|
||||
}
|
||||
|
||||
async getNewslettersCount() {
|
||||
|
|
Loading…
Add table
Reference in a new issue