perf: 优化 xpack license 检查 (#11885)

Co-authored-by: ibuler <ibuler@qq.com>
This commit is contained in:
fit2bot
2023-10-18 14:10:24 +08:00
committed by GitHub
parent f088bbce12
commit d3a283232f
10 changed files with 24 additions and 39 deletions

View File

@@ -61,7 +61,7 @@ class DownloadUploadMixin:
update = request.query_params.get('update')
is_enterprise = manifest.get('edition') == Applet.Edition.enterprise
if is_enterprise and not settings.XPACK_ENABLED:
if is_enterprise and not settings.XPACK_LICENSE_IS_VALID:
raise ValidationError({'error': _('This is enterprise edition applet')})
instance = Applet.objects.filter(name=name).first()