feat((model api key) and app):

fix bug
This commit is contained in:
Timebomb2018
2026-02-05 14:36:55 +08:00
parent effdb88455
commit 2444309bc2

View File

@@ -652,7 +652,7 @@ class ModelApiKeyService:
@staticmethod
def record_api_key_usage(db: Session, api_key_id: uuid.UUID | None) -> bool:
"""记录API Key使用"""
if not api_key_id:
if api_key_id:
success = ModelApiKeyRepository.update_usage(db, api_key_id)
if success:
db.commit()