From 38aee2e854b1c41e6564778669e6e07ad8b297a2 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Thu, 21 Oct 2021 16:33:34 +0200 Subject: [PATCH] publish --- app/models/communication/website/imported/page.rb | 1 + app/models/communication/website/imported/post.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/app/models/communication/website/imported/page.rb b/app/models/communication/website/imported/page.rb index ce4bc3901..59399aac8 100644 --- a/app/models/communication/website/imported/page.rb +++ b/app/models/communication/website/imported/page.rb @@ -85,6 +85,7 @@ class Communication::Website::Imported::Page < ApplicationRecord page.title = Wordpress.clean title.to_s page.description = ActionView::Base.full_sanitizer.sanitize excerpt.to_s page.text = Wordpress.clean content.to_s + page.published = true page.save end end diff --git a/app/models/communication/website/imported/post.rb b/app/models/communication/website/imported/post.rb index 571e67939..c9feebd09 100644 --- a/app/models/communication/website/imported/post.rb +++ b/app/models/communication/website/imported/post.rb @@ -89,6 +89,7 @@ class Communication::Website::Imported::Post < ApplicationRecord post.created_at = created_at post.updated_at = updated_at post.published_at = published_at if published_at + post.published = true post.save end end -- GitLab