diff --git a/src/db/post.rs b/src/db/post.rs index 49bf0a9..3116d2a 100755 --- a/src/db/post.rs +++ b/src/db/post.rs @@ -333,9 +333,11 @@ impl Post { .bind(content) .bind(&content_nomarkup) .bind(self.id) - .fetch_one(ctx.db()) + .fetch_optional(ctx.db()) .await?; + let Some(post) = post else { return Ok(()) }; + let old_key = format!( "by_content:{}", digest(self.content_nomarkup.to_lowercase())