From ee15f2d3d7e6c26853a6b6e9375720d8bdf1e31c Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 14 Jun 2023 21:10:35 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20json=20m2m=20filte?= =?UTF-8?q?r?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/db/fields.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/common/db/fields.py b/apps/common/db/fields.py index 2cd8edc2b..7aa1971d6 100644 --- a/apps/common/db/fields.py +++ b/apps/common/db/fields.py @@ -502,7 +502,7 @@ class JSONManyToManyDescriptor: value = [value.id] value = set(map(str, value)) rule_value = set(map(str, rule_value)) - res &= rule_value.issubset(value) + res &= value.issubset(rule_value) else: logging.error("unknown match: {}".format(rule['match'])) res &= False