From bd3b668d81d21b977f10f24ce80a9296ea1e902b Mon Sep 17 00:00:00 2001 From: asonix Date: Tue, 15 Aug 2023 20:28:42 -0500 Subject: [PATCH] Don't error on duplicate - happens on retried migration --- src/repo/migrate.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/repo/migrate.rs b/src/repo/migrate.rs index c106070..910d484 100644 --- a/src/repo/migrate.rs +++ b/src/repo/migrate.rs @@ -125,9 +125,7 @@ async fn do_migrate_hash_04( hash_details.internal_format().expect("format exists"), ); - HashRepo::create(new_repo.as_ref(), hash.clone(), &identifier) - .await? - .expect("not duplicate"); + let _ = HashRepo::create(new_repo.as_ref(), hash.clone(), &identifier).await?; new_repo.relate_details(&identifier, &hash_details).await?; for alias in aliases { @@ -136,9 +134,7 @@ async fn do_migrate_hash_04( .await? .unwrap_or_else(DeleteToken::generate); - AliasRepo::create(new_repo.as_ref(), &alias, &delete_token, hash.clone()) - .await? - .expect("not duplicate"); + let _ = AliasRepo::create(new_repo.as_ref(), &alias, &delete_token, hash.clone()).await?; } if let Some(motion_identifier) = motion_identifier {