Skip to content

Commit

Permalink
Merge pull request #107 from suchapalaver/fix/104-make-fetching-and-a…
Browse files Browse the repository at this point in the history
…dding-recipes-idempotent

fix(sqlite): make fetching recipes idempotent
  • Loading branch information
suchapalaver authored Dec 29, 2023
2 parents 89bfae2 + f00a3f7 commit 7192d55
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions crates/persistence/src/sqlite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ impl SqliteStore {
) -> Result<(), StoreError> {
diesel::insert_into(schema::items_recipes::table)
.values(NewItemRecipe { item_id, recipe_id })
.on_conflict_do_nothing()
.execute(connection)?;
Ok(())
}
Expand Down

0 comments on commit 7192d55

Please sign in to comment.