diff --git a/lib/db/clickhouse.js b/lib/db/clickhouse.js index e55e4542..4a14c5fc 100644 --- a/lib/db/clickhouse.js +++ b/lib/db/clickhouse.js @@ -1363,7 +1363,7 @@ const samplesReadTable = { */ const rawRequest = async (query, data, database, config) => { try { - if (!(Buffer.isBuffer(data) || data instanceof Uint8Array || typeof data === 'string')) { + if (data && !(Buffer.isBuffer(data) || data instanceof Uint8Array || typeof data === 'string')) { throw new Error('data must be Buffer, Uint8Array or String: currently the data is: ' + typeof data) } if (typeof query !== 'string') {