checking for id duplication is added
This commit is contained in:
parent
d89d93c9d0
commit
c4d8c03541
|
@ -80,6 +80,14 @@ impl Synchronizer {
|
|||
let res = self.game_api.list_games(req).await?;
|
||||
|
||||
for g in res.games {
|
||||
match upsert_games.iter().find(|v| v.id.eq(&g.id)) {
|
||||
Some(d) => {
|
||||
println!("id is duplicated. e: {:?}, n: {:?}", d, g);
|
||||
continue;
|
||||
}
|
||||
None => {}
|
||||
};
|
||||
|
||||
upsert_games.push(repositories::game::models::UpsertGame {
|
||||
id: g.id,
|
||||
vendor_id: v.id,
|
||||
|
|
Loading…
Reference in New Issue
Block a user