From 19866532145f8cf969cc0bfbb3e32181646ead64 Mon Sep 17 00:00:00 2001 From: ibuler Date: Tue, 24 Oct 2023 16:17:38 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E5=A4=8D=E8=B5=84=E4=BA=A7?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B=E7=9A=84=20bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/const/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/assets/const/base.py b/apps/assets/const/base.py index a77691c1b..c318115b5 100644 --- a/apps/assets/const/base.py +++ b/apps/assets/const/base.py @@ -64,14 +64,14 @@ class BaseType(TextChoices): @classmethod def _parse_protocols(cls, protocol, tp): from .protocol import Protocol - settings = Protocol.settings() + _settings = Protocol.settings() choices = protocol.get('choices', []) if choices == '__self__': choices = [tp] protocols = [] for name in choices: - protocol = {'name': name, **settings.get(name, {})} + protocol = {'name': name, **_settings.get(name, {})} setting = protocol.pop('setting', {}) setting_values = {k: v.get('default', None) for k, v in setting.items()} protocol['setting'] = setting_values @@ -112,7 +112,7 @@ class BaseType(TextChoices): @classmethod def get_choices(cls): - if not settings.XPACK_LICENSE_IS_VALID: + if not settings.XPACK_ENABLED: return [ (tp.value, tp.label) for tp in cls.get_community_types()