From 86f18de7a65d9dc17655c06b02c51493e3cbca20 Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Thu, 1 Jun 2023 12:16:54 +0200 Subject: [PATCH] fix(api_entreprise): nom_commercial can be nil --- app/graphql/types/personne_morale_type.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/graphql/types/personne_morale_type.rb b/app/graphql/types/personne_morale_type.rb index 345538cb4..1ebcb37c4 100644 --- a/app/graphql/types/personne_morale_type.rb +++ b/app/graphql/types/personne_morale_type.rb @@ -53,6 +53,10 @@ module Types object.capital_social || '-1' end + def nom_commercial + object.nom_commercial || '' + end + def code_effectif_entreprise # we need this in order to bypass Hashie::Dash deserialization issue on nil values object.code_effectif_entreprise