Browse Source

perf: 优化使用 bool

pull/10725/head
ibuler 1 year ago
parent
commit
d7121296f2
  1. 2
      apps/common/db/fields.py

2
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 &= value & rule_value
res &= bool(value & rule_value)
else:
logging.error("unknown match: {}".format(rule['match']))
res &= False

Loading…
Cancel
Save