Skip to content

Commit

Permalink
fix: delete all states of project
Browse files Browse the repository at this point in the history
  • Loading branch information
ARajgor committed Apr 25, 2024
1 parent 6d8975b commit 30e9828
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def delete_state(self, project: str):
with Session(self.engine) as session:
agent_state = session.query(AgentStateModel).filter(AgentStateModel.project == project).all()
if agent_state:
session.delete(agent_state)
for state in agent_state:
session.delete(state)
session.commit()

def add_to_current_state(self, project: str, state: dict):
Expand Down

0 comments on commit 30e9828

Please sign in to comment.