From 8cf8b2bc05bc1c69da69f0754d157cc957b9c832 Mon Sep 17 00:00:00 2001 From: asonix Date: Mon, 3 Jun 2024 16:29:13 -0500 Subject: [PATCH] Remove proxies row before deleting alias This fixes the issue of invalidating the proxies alias foreign key --- src/queue/cleanup.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/queue/cleanup.rs b/src/queue/cleanup.rs index 39b784a..659fbb2 100644 --- a/src/queue/cleanup.rs +++ b/src/queue/cleanup.rs @@ -153,9 +153,9 @@ pub(crate) async fn alias(repo: &ArcRepo, alias: Alias, token: DeleteToken) -> J let hash = repo.hash(&alias).await.retry()?; - repo.cleanup_alias(&alias).await.retry()?; repo.remove_relation(alias.clone()).await.retry()?; repo.remove_alias_access(alias.clone()).await.retry()?; + repo.cleanup_alias(&alias).await.retry()?; let hash = hash.ok_or(UploadError::MissingAlias).abort()?;