mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
fix is_team_count_over_limit
This commit is contained in:
parent
1bfe6a1110
commit
1c30d2745f
2 changed files with 5 additions and 2 deletions
|
|
@ -3114,3 +3114,4 @@ class EnterpriseLicenseData(TypedDict, total=False):
|
|||
user_id: str
|
||||
allowed_features: List[str]
|
||||
max_users: int
|
||||
max_teams: Optional[int]
|
||||
|
|
|
|||
|
|
@ -147,11 +147,13 @@ class LicenseCheck:
|
|||
"""
|
||||
if self.airgapped_license_data is None:
|
||||
return False
|
||||
|
||||
_max_teams_in_license: Optional[int] = self.airgapped_license_data.get("max_teams")
|
||||
if "max_teams" not in self.airgapped_license_data or not isinstance(
|
||||
self.airgapped_license_data["max_teams"], int
|
||||
_max_teams_in_license, int
|
||||
):
|
||||
return False
|
||||
return team_count > self.airgapped_license_data["max_teams"]
|
||||
return team_count > _max_teams_in_license
|
||||
|
||||
def verify_license_without_api_request(self, public_key, license_key):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue