fix is_team_count_over_limit

This commit is contained in:
Ishaan Jaff 2025-06-21 14:28:05 -07:00
parent 1bfe6a1110
commit 1c30d2745f
2 changed files with 5 additions and 2 deletions

View file

@ -3114,3 +3114,4 @@ class EnterpriseLicenseData(TypedDict, total=False):
user_id: str
allowed_features: List[str]
max_users: int
max_teams: Optional[int]

View file

@ -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: