From 63fa7f35e04c5d07b998768ca444a42c7b16279b Mon Sep 17 00:00:00 2001 From: Nexpro <51netpro@gmail.com> Date: Wed, 14 Jul 2021 15:32:06 +0800 Subject: [PATCH] Update extend_json_encoder.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加redis set类型查询支持 --- common/utils/extend_json_encoder.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/common/utils/extend_json_encoder.py b/common/utils/extend_json_encoder.py index faa1ea5d3f..f924dac58a 100644 --- a/common/utils/extend_json_encoder.py +++ b/common/utils/extend_json_encoder.py @@ -36,6 +36,11 @@ def _(o): return str(o) +@convert.register(set) +def _(o): + return list(o) + + class ExtendJSONEncoder(json.JSONEncoder): def default(self, obj): try: