From 8cf2806489c24a0fd56a4842da79354b7fbfcb21 Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Wed, 29 Nov 2023 00:15:35 +1100 Subject: [PATCH] fix(workflow_records): fix SQLite workflow insertion to ignore duplicates --- .../app/services/workflow_records/workflow_records_sqlite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/app/services/workflow_records/workflow_records_sqlite.py b/invokeai/app/services/workflow_records/workflow_records_sqlite.py index b0952e8234..a27ba4306e 100644 --- a/invokeai/app/services/workflow_records/workflow_records_sqlite.py +++ b/invokeai/app/services/workflow_records/workflow_records_sqlite.py @@ -54,7 +54,7 @@ class SqliteWorkflowRecordsStorage(WorkflowRecordsStorageBase): self._lock.acquire() self._cursor.execute( """--sql - INSERT INTO workflows(workflow) + INSERT OR IGNORE INTO workflows(workflow) VALUES (?); """, (workflow.model_dump_json(),),