corrected error message (#2502)

This commit is contained in:
hagen-danswer 2024-09-18 12:13:28 -07:00 committed by GitHub
parent d3dfabb20e
commit 54bb79303c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -669,9 +669,7 @@ def get_persona_by_id(
result = db_session.execute(persona_stmt)
persona = result.scalar_one_or_none()
if persona is None:
raise ValueError(
f"Persona with ID {persona_id} does not exist or does not belong to user"
)
raise ValueError(f"Persona with ID {persona_id} does not exist")
return persona
# or check if user owns persona