fix(db-postgres): sorting on a not-configured field throws error (#4382)

This commit is contained in:
Dan Ribbens
2023-12-06 09:27:43 -05:00
committed by GitHub
parent cf9a3704df
commit dbaecda0e9
3 changed files with 42 additions and 27 deletions

View File

@@ -614,6 +614,14 @@ describe('collections-rest', () => {
expect(status).toEqual(200)
expect(result.docs).toHaveLength(1)
})
it('should not error when attempting to sort on a field that does not exist', async () => {
const { status } = await client.find({
sort: 'fake',
})
expect(status).toStrictEqual(200)
})
})
describe('Operators', () => {