@mixd-id/web-scaffold 0.1.230406317 → 0.1.230406318
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
|
@@ -362,8 +362,14 @@ const filtersToSequelizeWhere = async(filters, opt) => {
|
|
|
362
362
|
const type = ((keyColumns[key] ?? [])[0] ?? {}).type
|
|
363
363
|
|
|
364
364
|
let whereObj = {}
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
let Model, field
|
|
366
|
+
if(opt.model){
|
|
367
|
+
const modelAttributes = opt.model.getAttributes()
|
|
368
|
+
if(modelAttributes[key]){
|
|
369
|
+
Model = opt.model
|
|
370
|
+
field = modelAttributes[key].field
|
|
371
|
+
}
|
|
372
|
+
}
|
|
367
373
|
|
|
368
374
|
switch(type){
|
|
369
375
|
|