@autofleet/sadot 0.7.7 → 0.7.8-beta-1
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 +1 -1
- package/src/scopes/filter.ts +3 -2
package/package.json
CHANGED
package/src/scopes/filter.ts
CHANGED
|
@@ -128,12 +128,13 @@ export const customFieldsFilterScope = (
|
|
|
128
128
|
SELECT cv.model_id
|
|
129
129
|
FROM custom_field_values AS cv
|
|
130
130
|
INNER JOIN custom_field_definitions AS cd ON cv.custom_field_definition_id = cd.id
|
|
131
|
-
|
|
131
|
+
AND cd.model_type = '${name}'
|
|
132
132
|
WHERE ${customFieldConditions}
|
|
133
|
+
AND cv.deleted_at IS NULL AND cd.deleted_at IS NULL
|
|
133
134
|
GROUP BY cv.model_id
|
|
134
135
|
HAVING COUNT(DISTINCT cv.custom_field_definition_id) = ${conditionsStrings.length}
|
|
135
136
|
`.replace(/\n/g, '');
|
|
136
|
-
|
|
137
|
+
|
|
137
138
|
return {
|
|
138
139
|
where: {
|
|
139
140
|
id: {
|