From 0b16750e0141c850d1a0e3a43adac00a9b1cfec5 Mon Sep 17 00:00:00 2001 From: PARK BYUNG JUN Date: Tue, 30 Aug 2022 15:41:49 +0000 Subject: [PATCH] bug fixed --- src/repositories/betting_history/repository.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/repositories/betting_history/repository.rs b/src/repositories/betting_history/repository.rs index e6aba62..3049940 100644 --- a/src/repositories/betting_history/repository.rs +++ b/src/repositories/betting_history/repository.rs @@ -46,8 +46,12 @@ impl Repository { conn: &diesel::PgConnection, new_betting_history: &Vec, ) -> Result<(), Error> { + use api_kgon_betting_history::dsl; + diesel::insert_into(api_kgon_betting_history::table) .values(new_betting_history) + .on_conflict(dsl::id) + .do_nothing() .execute(conn)?; Ok(())