Skip to content
Snippets Groups Projects
Unverified Commit 49562a9b authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

fix

parent 2ce64359
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,7 @@ module Communication::Website::WithGitRepository
end
def should_clean_on_git?
saved_change_to_about_id? || language_was_removed
# Clean website if about was present and changed OR a language was removed
(saved_change_to_about_id? && about_id_before_last_save.present?) || language_was_removed
end
end
......@@ -47,15 +47,15 @@ module AsIndirectObject
end
end
protected
def direct_sources_from_existing_connections
connections.collect &:direct_source
end
protected
def direct_sources_from_reference(reference)
reference.is_direct_object? ? [reference] # Récupération de la connexion directe
: reference.direct_sources # Récursivité sur les références
: reference.direct_sources_from_existing_connections # Récupération via les connexions des références
end
def connect_and_sync_direct_sources
......
......@@ -151,7 +151,9 @@ class Education::Program < ApplicationRecord
end
def references
descendants
references = schools + siblings + descendants
references << parent if parent.present?
references
end
def update_children_paths
......
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