fix: sorting by non-existing value throws INVALID_SERVER_ERROR on Postgres (#8157)
This commit is contained in:
@@ -1207,6 +1207,9 @@ class DatabaseController {
|
||||
`Invalid field name: ${fieldName}.`
|
||||
);
|
||||
}
|
||||
if (!schema.fields[fieldName.split('.')[0]] && fieldName !== 'score') {
|
||||
delete sort[fieldName];
|
||||
}
|
||||
});
|
||||
return (isMaster
|
||||
? Promise.resolve()
|
||||
|
||||
Reference in New Issue
Block a user