Skip to content

Commit c837b19

Browse files
committed
fix: reset chat
1 parent e40db9f commit c837b19

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

dinamodb_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,5 +42,6 @@ def load_messages(self, table_id):
4242

4343
def reset_chat(self, table_id):
4444
""" Reset a chat in a DynamoDB table"""
45-
response = self.save_messages(table_id, [])
45+
table = dynamodb.Table(DYNAMODB_TABLE_NAME)
46+
response = table.delete_item(Key={'chat_id': table_id})
4647
return response

0 commit comments

Comments
 (0)