From 1dc175f19e643b6276be95f4cf25f4744f836d1e Mon Sep 17 00:00:00 2001
From: Arnaud Levy <contact@arnaudlevy.com>
Date: Thu, 21 Oct 2021 11:02:35 +0200
Subject: [PATCH] fix

---
 app/models/communication/website/imported/post.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/models/communication/website/imported/post.rb b/app/models/communication/website/imported/post.rb
index ebcfa1205..25942d0d9 100644
--- a/app/models/communication/website/imported/post.rb
+++ b/app/models/communication/website/imported/post.rb
@@ -75,7 +75,8 @@ class Communication::Website::Imported::Post < ApplicationRecord
       self.post.save
     end
     # TODO only if not modified since import
-    post.title = Wordpress.clean title.to_s
+    title = Wordpress.clean title.to_s
+    post.title = title unless title.blank? # If there is no title, leave it with "Untitled"
     post.slug = slug
     post.description = Wordpress.clean excerpt.to_s
     post.text = Wordpress.clean content.to_s
-- 
GitLab