Skip to content

Commit

Permalink
Fix form when we do not use any resource factory (#194)
Browse files Browse the repository at this point in the history
When we do not use any resource factory (eg: on resource detached from
Doctrine), we have an error cause the resource is not defined.
  • Loading branch information
loic425 authored Dec 23, 2024
2 parents 1148d5e + 161e95f commit 96338ad
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% endif %}

{% if resource is not defined %}
{% set resource = hookable_metadata.context.resource %}
{% set resource = hookable_metadata.context.resource|default(null) %}
{% endif %}

{% form_theme form '@SyliusBootstrapAdminUi/shared/form_theme.html.twig' %}
Expand Down

0 comments on commit 96338ad

Please sign in to comment.