From c38c5395d2ab848f0fce41ad53923981cf2c9051 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Mon, 30 Sep 2024 11:03:07 +0800 Subject: [PATCH] small style --- kong/db/declarative/import.lua | 2 ++ spec/01-unit/01-db/11-declarative_lmdb_spec.lua | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/kong/db/declarative/import.lua b/kong/db/declarative/import.lua index 9a05c1651f7c..5b0a726b7341 100644 --- a/kong/db/declarative/import.lua +++ b/kong/db/declarative/import.lua @@ -266,6 +266,8 @@ end -- * ||*| => serialized item -- * |||sha256(field_value) => ||*| -- * |||| -> ||*| +-- +-- DO NOT touch `item`, or else the entity will be changed local function insert_entity_for_txn(t, entity_name, item, options) local dao = kong.db[entity_name] local schema = dao.schema diff --git a/spec/01-unit/01-db/11-declarative_lmdb_spec.lua b/spec/01-unit/01-db/11-declarative_lmdb_spec.lua index 3f931c1fa769..6fbe9181c967 100644 --- a/spec/01-unit/01-db/11-declarative_lmdb_spec.lua +++ b/spec/01-unit/01-db/11-declarative_lmdb_spec.lua @@ -242,7 +242,6 @@ describe("#off preserve nulls", function() cached_item = buffer.decode(lmdb.get(value)) assert.are_same(cached_item, plugin) - assert.are_equal(cached_item.config.large, null) assert.are_equal(cached_item.config.ttl, null)