diff --git a/src/Resources/views/CRUD/Association/edit_many_to_many.html.twig b/src/Resources/views/CRUD/Association/edit_many_to_many.html.twig index 329ea535c4..5312384c6e 100644 --- a/src/Resources/views/CRUD/Association/edit_many_to_many.html.twig +++ b/src/Resources/views/CRUD/Association/edit_many_to_many.html.twig @@ -17,7 +17,7 @@ file that was distributed with this source code. - {% for field_name, nested_field in form.children[0].children %} + {% for field_name, nested_field in (form.children|first).children %} {% if field_name == '_delete' %} {% else %}
{{ 'action_delete'|trans({}, 'SonataAdminBundle') }}