Adding back in on_conflict.
This commit is contained in:
parent
81b204c1b8
commit
0578c8f548
2 changed files with 6 additions and 2 deletions
|
@ -166,7 +166,9 @@ impl Comment {
|
|||
use crate::schema::comment::dsl::*;
|
||||
insert_into(comment)
|
||||
.values(comment_form)
|
||||
.on_conflict_do_nothing()
|
||||
.on_conflict(ap_id)
|
||||
.do_update()
|
||||
.set(comment_form)
|
||||
.get_result::<Self>(conn)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,7 +183,9 @@ impl Post {
|
|||
use crate::schema::post::dsl::*;
|
||||
insert_into(post)
|
||||
.values(post_form)
|
||||
.on_conflict_do_nothing()
|
||||
.on_conflict(ap_id)
|
||||
.do_update()
|
||||
.set(post_form)
|
||||
.get_result::<Self>(conn)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue