diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
index 85268a06a..3e6ea2011 100644
--- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml
+++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml
@@ -713,5 +713,6 @@ news:
gender:
genderTranslation: traduction grammaticale
+ not defined: Non défini
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js
index d8f5700ff..bc8ce60e2 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_api/OnTheFly.js
@@ -24,12 +24,12 @@ const getCivilities = () =>
throw Error('Error with request resource response');
});
-const getGenders = () =>
- makeFetch("GET", '/api/1.0/main/gender.json').
- .then(response => {
- if (response.ok) { return response.json(); }
- throw Error('Error with request resource response');
- });
+const getGenders = () => makeFetch("GET", '/api/1.0/main/gender.json')
+ // .then(response => {
+ // console.log(response)
+ // if (response.ok) { return response.json(); }
+ // throw Error('Error with request resource response');
+ // });
const getCentersForPersonCreation = () => makeFetch('GET', '/api/1.0/person/creation/authorized-centers', null);
diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue
index df3e77897..26f13d65f 100644
--- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue
+++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/Entity/PersonRenderBox.vue
@@ -39,7 +39,7 @@
{%- if options['addAge'] -%}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig
index d07799de2..5cf0d7ea0 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/list_with_period.html.twig
@@ -45,7 +45,7 @@
{% if acp.requestoranonymous == false and acp.requestorPerson is same as(person) %}
- {{ 'Requestor'|trans({'gender': person.gender}) }}
+ {{ 'Requestor'|trans({'gender': person.gender ? person.gender.genderTranslation.value : 'neutral'}) }}
{% endif %}
@@ -119,7 +119,7 @@
{% endif %}
{% endfor %}
{% if participating %}
- {{ 'person.And himself'|trans({'gender': person.gender.genderTranslation.value}) }}
+ {{ 'person.And himself'|trans({'gender': person.gender ? person.gender.genderTranslation.value : 'neutral'}) }}
{% endif %}
@@ -131,7 +131,7 @@
{% if acp.requestorPerson is not null %}
- {{ 'Requestor'|trans({'gender': acp.requestorPerson.gender.genderTranslation.value}) }}
+ {{ 'Requestor'|trans({'gender': acp.requestorPerson.gender ? person.gender.genderTranslation.value : 'neutral'}) }}
{% else %}
{{ 'Requestor'|trans({'gender': 'other'})}}
{% endif %}
diff --git a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig
index 2f9844d6a..ba1fbc372 100644
--- a/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig
+++ b/src/Bundle/ChillPersonBundle/Resources/views/Person/view.html.twig
@@ -73,8 +73,11 @@ This view should receive those arguments:
{% endfor %}
{{ 'Gender'|trans }} :
- {{ ( person.gender.label|localize_translatable_string ) }}
-
+ {% if person.gender %}
+ {{ ( person.gender.label|localize_translatable_string ) }}
+ {% else %}
+ {{ 'gender.not defined'|trans }}
+ {% endif %}