mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed count for redemptions
no-issue You must use `where` rather than `forge` when generating counts.
This commit is contained in:
parent
3cd26bc11b
commit
dbf549b664
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ class OfferRepository {
|
|||
async mapToOffer(model, options) {
|
||||
const json = model.toJSON();
|
||||
|
||||
const count = await this.OfferRedemptionModel.forge({offer_id: json.id}).count('id', {
|
||||
const count = await this.OfferRedemptionModel.where({offer_id: json.id}).count('id', {
|
||||
transacting: options.transacting
|
||||
});
|
||||
return Offer.create({
|
||||
|
|
Loading…
Add table
Reference in a new issue