gemcap-be-common 1.5.85 → 1.5.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.85",
3
+ "version": "1.5.86",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -35,7 +35,7 @@ class YieldService {
35
35
  }
36
36
  async getCalculatedYieldTotalsForPeriod(productIds, periodStart, periodEnd) {
37
37
  return Yield_model_1.YieldData.find({
38
- productId: productIds.map((productId) => new mongoose_1.default.Types.ObjectId(productId)),
38
+ productId: { $in: productIds.map((productId) => new mongoose_1.default.Types.ObjectId(productId)) },
39
39
  $or: [
40
40
  {
41
41
  year: periodStart.year,
@@ -41,7 +41,7 @@ export class YieldService {
41
41
 
42
42
  async getCalculatedYieldTotalsForPeriod(productIds: string[], periodStart: ISelectedMonth, periodEnd: ISelectedMonth) {
43
43
  return YieldData.find({
44
- productId: productIds.map((productId) => new mongoose.Types.ObjectId(productId)),
44
+ productId: { $in: productIds.map((productId) => new mongoose.Types.ObjectId(productId)) },
45
45
  $or: [
46
46
  {
47
47
  year: periodStart.year,