From 8fce92e2e04cf9ed31d8bf4dc720f3e2af7a5eda Mon Sep 17 00:00:00 2001
From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com>
Date: Tue, 11 Oct 2022 11:53:56 +0200
Subject: [PATCH] publish: fix: limit date

generated from commit 889d9284df58b84105e797f0a4bddb5294c3c1d4
---
 index.js | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/index.js b/index.js
index bc9ce60..03570df 100644
--- a/index.js
+++ b/index.js
@@ -228575,6 +228575,19 @@ async function verifyUserIdentity(
     )
 
     // Third try, remove address number because it's buggy on SGE side
+    if (!pdl) {
+      log('warn', 'Third chance onboarding for sge')
+      pdl = await findUserPdl(
+        `${baseUrl}/enedis_SDE_recherche-point/1.0`,
+        apiAuthKey,
+        loginUtilisateur,
+        fields.lastname,
+        removeMultipleSpaces(removeAddressnumber(userAddress.numeroEtNomVoie)),
+        userAddress.codePostal,
+        userAddress.commune.$.code
+      )
+    }
+    // Third try, remove address number and add escalierEtEtageEtAppartement because it's buggy on SGE side
     if (!pdl) {
       log('warn', 'Last chance onboarding for sge')
       pdl = await findUserPdl(
-- 
GitLab