Allow duplicate card creation

If you are trying to create the same card again it probably means
that you have forgotten what it means.
This commit is contained in:
Thiago Chaves 2022-08-10 18:53:16 +03:00
parent 1ea6ff51a8
commit 51122cceef

View File

@ -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,