fix: Do not fail to upgrade if the verifier of a contact doesn't exist anymore (#7044)

Fix https://github.com/chatmail/core/issues/7043
This commit is contained in:
Hocuri
2025-07-26 22:41:11 +02:00
committed by GitHub
parent 4e47ebd5fc
commit 9d342671d5

View File

@@ -1480,9 +1480,11 @@ fn migrate_key_contacts(
} else if addr.is_empty() {
Ok(default)
} else {
original_contact_id_from_addr_stmt
Ok(original_contact_id_from_addr_stmt
.query_row((addr,), |row| row.get(0))
.with_context(|| format!("Original contact '{addr}' not found"))
.optional()
.with_context(|| format!("Original contact '{addr}' not found"))?
.unwrap_or(default))
}
};