From 51122cceef4d3e561656cd09f994aad47e65e3fb Mon Sep 17 00:00:00 2001 From: Thiago Chaves Date: Wed, 10 Aug 2022 18:53:16 +0300 Subject: [PATCH] Allow duplicate card creation If you are trying to create the same card again it probably means that you have forgotten what it means. --- src/model/database.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/model/database.ts b/src/model/database.ts index 6d70ee2..d2f15dc 100644 --- a/src/model/database.ts +++ b/src/model/database.ts @@ -154,15 +154,6 @@ export async function addExpressionWithRelationships({ expression_set_id, category_ids, }: addExpressionWithRelationshipsParams) { - const existing = await database.expressions - .where("prompt") - .equals(expression.prompt) - .first(); - if (existing) { - const error_message = `Expression ${expression.prompt} already exists in database`; - console.error(error_message); - throw new Error(error_message); - } return await database.transaction( "rw", database.expressions,