mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
🐛 Fixed failing update-check job
refs https://github.com/TryGhost/Toolbox/issues/525 refs https://github.com/TryGhost/Ghost/pull/16224 - The update check job has been failing due to uninitialized Members Service. Loading Tiers in the context of update check is not important because all we are looking for is the posts count. - The products repository list service is also about to be replace by Tiers repository, so getting correctly initialized members service is not crucial.
This commit is contained in:
parent
6afcf8eec8
commit
81f8abdbd6
1 changed files with 2 additions and 2 deletions
|
@ -12,10 +12,10 @@ module.exports = {
|
|||
}
|
||||
let posts = [];
|
||||
|
||||
const tiersModels = await membersService.api.productRepository.list({
|
||||
const tiersModels = await membersService.api?.productRepository.list({
|
||||
limit: 'all'
|
||||
});
|
||||
const tiers = tiersModels.data ? tiersModels.data.map(tierModel => tierModel.toJSON()) : [];
|
||||
const tiers = tiersModels?.data ? tiersModels.data.map(tierModel => tierModel.toJSON()) : [];
|
||||
if (models.meta) {
|
||||
for (let model of models.data) {
|
||||
let post = await mappers.posts(model, frame, {tiers});
|
||||
|
|
Loading…
Add table
Reference in a new issue