fix(proxy/utils.py): fix try-except for creating a view

This commit is contained in:
Krrish Dholakia 2024-02-26 22:44:05 -08:00
parent 55d59c0ec6
commit 212e59b49e

View file

@ -504,7 +504,6 @@ class PrismaClient:
except Exception as e:
# If an error occurs, the view does not exist, so create it
value = await self.health_check()
if '"litellm_verificationtokenview" does not exist' in str(e):
await self.db.execute_raw(
"""
CREATE VIEW "LiteLLM_VerificationTokenView" AS
@ -518,8 +517,6 @@ class PrismaClient:
LEFT JOIN "LiteLLM_TeamTable" t ON v.team_id = t.team_id;
"""
)
else:
raise e
return "LiteLLM_VerificationTokenView Created!"