Skip to content

Commit

Permalink
Fixed bug when passing offer IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoRosendo committed Mar 5, 2022
1 parent 88bcffc commit 5b5769d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/offer.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ class OfferService {
} },
{ $match: { "$or": [
{ score: { "$lt": lastOfferScore } },
{ score: lastOfferScore, _id: { "$gt": lastOfferId } }
{ score: lastOfferScore, _id: { "$gt": ObjectId(lastOfferId) } }
] } },
{ $match: Offer.currentCondition() },
{ $match: showHidden ? {} : Offer.withoutHiddenCondition() }
Expand All @@ -229,7 +229,7 @@ class OfferService {

offers = Offer.find({ "$and": [
this._buildFilterQuery(filters),
{ _id: { "$gt": lastOfferId } }
{ _id: { "$gt": ObjectId(lastOfferId) } }
] });

} else {
Expand Down

0 comments on commit 5b5769d

Please sign in to comment.