rez_core 2.1.51 → 2.1.52
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
|
@@ -462,8 +462,9 @@ export class FilterService {
|
|
|
462
462
|
const op = filter.filter_operator;
|
|
463
463
|
const key = `param_${attr}_${Math.random().toString(36).substring(2, 8)}`;
|
|
464
464
|
|
|
465
|
-
if (meta.data_source_type === 'entity' && !filter.skip_id)
|
|
465
|
+
if (meta.data_source_type === 'entity' && !filter.skip_id) {
|
|
466
466
|
attr = `${attr}_id`;
|
|
467
|
+
}
|
|
467
468
|
|
|
468
469
|
switch (meta.data_type) {
|
|
469
470
|
case 'text':
|
|
@@ -560,8 +561,16 @@ export class FilterService {
|
|
|
560
561
|
if (typeof val === 'string') {
|
|
561
562
|
val = val.split(',').map((v) => v.trim());
|
|
562
563
|
}
|
|
563
|
-
|
|
564
|
-
|
|
564
|
+
|
|
565
|
+
if (
|
|
566
|
+
!Array.isArray(val) ||
|
|
567
|
+
val.length !== 2 ||
|
|
568
|
+
val[0] === '' ||
|
|
569
|
+
val[1] === ''
|
|
570
|
+
) {
|
|
571
|
+
// throw new BadRequestException(`Invalid value for in_between: ${val}`);
|
|
572
|
+
console.log(`Invalid value for in_between: ${val}`);
|
|
573
|
+
return null;
|
|
565
574
|
}
|
|
566
575
|
return {
|
|
567
576
|
query: `e.${attr} BETWEEN :${key}_start AND :${key}_end`,
|