From adaae781589c320199153622fdb2dc83b145b9cc Mon Sep 17 00:00:00 2001
From: Benoit Alessandroni <benoit@happy-dev.fr>
Date: Mon, 25 May 2020 18:46:28 +0200
Subject: [PATCH] Properly refreshing everybody profile

---
 src/scripts/coopstarter.js | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js
index 55d598dc..e521a253 100644
--- a/src/scripts/coopstarter.js
+++ b/src/scripts/coopstarter.js
@@ -130,6 +130,15 @@ async function refreshUser(formId, listId) {
       if (account) {
         account.clearCache();
       }
+
+      let profile = await listProxy['entrepreneurProfile'];
+      // Refresh du cache sur le account du user
+      if (profile) {
+        profile.clearCache();
+      } else {
+        profile = await listProxy['mentorProfile'];
+        profile.clearCache();
+      }
     }
   });
 }
-- 
GitLab