From 052860e62aa28264452143c03a13341948b505f2 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Tue, 27 Feb 2024 11:04:06 -0500 Subject: [PATCH] Ignoring errors. --- crates/api/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/api/src/lib.rs b/crates/api/src/lib.rs index f92fcb850..0e60fb61a 100644 --- a/crates/api/src/lib.rs +++ b/crates/api/src/lib.rs @@ -187,6 +187,7 @@ pub(crate) async fn ban_nonlocal_user_from_local_communities( }; if ban { + // Ignore all errors for these CommunityPersonBan::ban(&mut context.pool(), &community_user_ban_form) .await .with_lemmy_type(LemmyErrorType::CommunityUserAlreadyBanned) @@ -205,7 +206,8 @@ pub(crate) async fn ban_nonlocal_user_from_local_communities( } else { CommunityPersonBan::unban(&mut context.pool(), &community_user_ban_form) .await - .with_lemmy_type(LemmyErrorType::CommunityUserAlreadyBanned)?; + .with_lemmy_type(LemmyErrorType::CommunityUserAlreadyBanned) + .ok(); } // Mod tables