@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.
- package/dist/lib/utility.js +8 -0
- package/package.json +1 -1
package/dist/lib/utility.js
CHANGED
|
@@ -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
|
}
|