Skip to content

Commit

Permalink
no component in array of dependencies (#1934)
Browse files Browse the repository at this point in the history
  • Loading branch information
SebouChu committed May 27, 2024
1 parent b8904ad commit 0ed8034
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/concerns/with_dependencies.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def recursive_dependencies_add(array, dependency, syncable_only, follow_direct)
# Si l'objet ne doit pas être ajouté on n'ajoute pas non plus ses dépendances récursives
# C'est le fait de couper ici qui évite la boucle infinie
return array unless dependency_should_be_added?(array, dependency, syncable_only)
array << dependency
array << dependency if dependency.is_a?(ActiveRecord::Base)
return array if !follow_direct && dependency.try(:is_direct_object?)
return array unless dependency.respond_to?(:recursive_dependencies)
dependency.recursive_dependencies(array: array, syncable_only: syncable_only, follow_direct: follow_direct)
Expand Down

0 comments on commit 0ed8034

Please sign in to comment.