Skip to content

Commit

Permalink
Fix persona id change
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves committed Feb 19, 2024
1 parent aa6d86a commit 6b3ad15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/danswer/db/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from uuid import UUID

from sqlalchemy import delete
from sqlalchemy import func
from sqlalchemy import not_
from sqlalchemy import nullsfirst
from sqlalchemy import or_
Expand Down Expand Up @@ -556,7 +557,7 @@ def delete_old_default_personas(
stmt = (
update(Persona)
.where(Persona.default_persona, Persona.id > 0)
.values(deleted=True)
.values(deleted=True, name=func.concat(Persona.name, "_old"))
)

db_session.execute(stmt)
Expand Down

0 comments on commit 6b3ad15

Please sign in to comment.