correctly set perkMonthCount

This commit is contained in:
Phillip Thelen 2023-02-23 13:20:47 +01:00
parent 3f56b7fa3f
commit be18476292

View file

@ -257,7 +257,9 @@ async function createSubscription (data) {
if (!data.gift && !groupId) {
plan.consecutive.offset = block.months;
}
await plan.incrementPerkCounterAndReward(recipient._id, months);
if (months > 1) {
await plan.incrementPerkCounterAndReward(recipient._id, months);
}
}
if (recipient !== group) {