Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: license str parser. (#11248)

Garfield Daidbc10e0feb66
diff --git a/api/services/feature_service.py b/api/services/feature_service.py
index c2203b167d7..6bd82a27574 100644
--- a/api/services/feature_service.py
+++ b/api/services/feature_service.py
@@ -171,8 +171,10 @@ class FeatureService:
features.is_allow_create_workspace = enterprise_info["is_allow_create_workspace"]
if "license" in enterprise_info:
- if "status" in enterprise_info["license"]:
- features.license.status = enterprise_info["license"]["status"]
+ license_info = enterprise_info["license"]
- if "expired_at" in enterprise_info["license"]:
- features.license.expired_at = enterprise_info["license"]["expired_at"]
+ if "status" in license_info:
+ features.license.status = LicenseStatus(license_info.get("status", LicenseStatus.INACTIVE))
+
+ if "expired_at" in license_info:
+ features.license.expired_at = license_info["expired_at"]