Fix null references

This commit is contained in:
Adria Navarro 2024-05-21 11:24:04 +02:00
parent 0b01b67661
commit 2b1df81649
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ function generateSelectStatement(
}
if (
knex.client.config.client === SqlClient.MS_SQL &&
columnSchema.type === FieldType.DATETIME &&
columnSchema?.type === FieldType.DATETIME &&
columnSchema.timeOnly
) {
return knex.raw(`CONVERT(varchar, ${field}, 108) as "${field}"`)