@optimiser/common 1.0.292 → 1.0.293

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.
@@ -4583,6 +4583,10 @@ function ValidateUserInput(options) {
4583
4583
  return [3 /*break*/, 51];
4584
4584
  case 8:
4585
4585
  searchObj = { _id: fieldData };
4586
+ if (field.LookupKey) {
4587
+ searchObj = {};
4588
+ searchObj[field.LookupKey] = fieldData;
4589
+ }
4586
4590
  if (action == 'add') {
4587
4591
  searchObj.IsActive = true;
4588
4592
  }
@@ -4598,6 +4602,10 @@ function ValidateUserInput(options) {
4598
4602
  if (!Array.isArray(fieldData)) return [3 /*break*/, 16];
4599
4603
  if (!fieldData.length) return [3 /*break*/, 14];
4600
4604
  searchObj = { _id: { $in: fieldData } };
4605
+ if (field.LookupKey) {
4606
+ searchObj = {};
4607
+ searchObj[field.LookupKey] = { $in: fieldData };
4608
+ }
4601
4609
  if (action == 'add') {
4602
4610
  searchObj.IsActive = true;
4603
4611
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optimiser/common",
3
- "version": "1.0.292",
3
+ "version": "1.0.293",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {