Skip to content
Snippets Groups Projects
Unverified Commit 5cb8c402 authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

fix unpublished by last save (#1762)

parent 005ce314
No related branches found
No related tags found
No related merge requests found
......@@ -117,7 +117,7 @@ module WithDependencies
clean_websites(websites_to_clean.pluck(:id))
end
end
def clean_websites(websites_ids)
# Les objets directs et les objets indirects (et les websites) répondent !
return unless respond_to?(:is_direct_object?)
......@@ -142,7 +142,7 @@ module WithDependencies
return unless respond_to?(:published)
return true if saved_change_to_published? && !published?
if respond_to?(:published_at)
return saved_change_to_published_at? && published_at > Time.now
return saved_change_to_published_at? && (published_at.nil? || published_at > Time.now)
end
false
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment