From e1819fb7e574532c2dcd6a5ce7c572f8acb1e794 Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 9 Oct 2025 02:50:01 +0000 Subject: [PATCH] [autofix.ci] apply automated fixes --- api/core/provider_manager.py | 4 ++-- api/services/credit_pool_service.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/core/provider_manager.py b/api/core/provider_manager.py index 3ecd646862..522dc6c372 100644 --- a/api/core/provider_manager.py +++ b/api/core/provider_manager.py @@ -620,7 +620,7 @@ class ProviderManager: for quota in configuration.quotas: if quota.quota_type in (ProviderQuotaType.TRIAL, ProviderQuotaType.PAID): # Init trial provider records if not exists - if quota.quota_type not in provider_quota_to_provider_record_dict: + if quota.quota_type not in provider_quota_to_provider_record_dict: try: # FIXME ignore the type error, only TrialHostingQuota has limit need to change the logic new_provider_record = Provider( @@ -652,7 +652,7 @@ class ProviderManager: existed_provider_record.is_valid = True db.session.commit() - provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) + provider_name_to_provider_records_dict[provider_name].append(existed_provider_record) return provider_name_to_provider_records_dict diff --git a/api/services/credit_pool_service.py b/api/services/credit_pool_service.py index 108ee05e45..5f14735d1f 100644 --- a/api/services/credit_pool_service.py +++ b/api/services/credit_pool_service.py @@ -24,7 +24,7 @@ class CreditPoolService: return credit_pool @classmethod - def get_pool(cls, tenant_id: str, pool_type: str = "trial") -> Optional[TenantCreditPool]: + def get_pool(cls, tenant_id: str, pool_type: str = "trial") -> TenantCreditPool | None: """get tenant credit pool""" return ( db.session.query(TenantCreditPool)