mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-28 13:22:39 +03: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
@ -101,7 +101,7 @@ class OfferRepository {
|
|||||||
async mapToOffer(model, options) {
|
async mapToOffer(model, options) {
|
||||||
const json = model.toJSON();
|
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
|
transacting: options.transacting
|
||||||
});
|
});
|
||||||
return Offer.create({
|
return Offer.create({
|
||||||
|
Loading…
Reference in New Issue
Block a user