Fix searcing for a date on a string field.
This commit is contained in:
parent
cc3d087e82
commit
38fce3ac3e
|
@ -388,7 +388,7 @@ class InternalBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
if (typeof input === "string") {
|
||||
if (typeof input === "string" && schema.type === FieldType.DATETIME) {
|
||||
if (isInvalidISODateString(input)) {
|
||||
return null
|
||||
}
|
||||
|
|
|
@ -1040,6 +1040,12 @@ if (descriptions.length) {
|
|||
string: { name: "FO" },
|
||||
}).toContainExactly([{ name: "foo" }])
|
||||
})
|
||||
|
||||
it("should not coerce string to date for string columns", async () => {
|
||||
await expectQuery({
|
||||
string: { name: "2020-01-01" },
|
||||
}).toFindNothing()
|
||||
})
|
||||
})
|
||||
|
||||
describe("range", () => {
|
||||
|
|
Loading…
Reference in New Issue