From 161e96996648a098983fc5ad5ad9c0f0e41db25a Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 14 Jul 2020 09:17:03 +0200 Subject: [PATCH] Fix a issue with old comments --- src/helpers/comments_helper.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/comments_helper.rs b/src/helpers/comments_helper.rs index ed7a733..8bf24f6 100644 --- a/src/helpers/comments_helper.rs +++ b/src/helpers/comments_helper.rs @@ -57,7 +57,8 @@ fn db_to_comment(row: &database::RowResult) -> ResultBoxError { user_id: row.get_user_id("ID_personne")?, post_id: row.get_u64("ID_texte")?, content: row.get_str("commentaire")?, - image_path: row.get_optional_str("image_commentaire")?, + image_path: row.get_optional_str("image_commentaire")? + .map(|f| f.replace("file:", "")), }) }