Erreur dans la méthode 'structures.getContactURL' si l'utilisateur n'a pas de structure
Exception rencontrée dans les logs serveur suite à la connexion d'un nouvel utilisateur :
I20231214-11:54:54.028(1)? Exception while invoking method 'structures.getContactURL' TypeError: Cannot read property 'externalUrl' of undefined
I20231214-11:54:54.029(1)? at getExternalService (imports/api/structures/utils.js:56:13)
I20231214-11:54:54.029(1)? at MethodInvocation.run (imports/api/structures/methods.js:579:12)
I20231214-11:54:54.029(1)? at ValidatedMethod._execute (packages/mdg:validated-method/validated-method.js:141:43)
I20231214-11:54:54.029(1)? at MethodInvocation.structures.getContactURL (packages/mdg:validated-method/validated-method.js:62:23)
I20231214-11:54:54.029(1)? at MethodInvocation.wrappedMethodHandler (packages/seba:method-hooks/server.js:14:17)
I20231214-11:54:54.029(1)? at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1902:12)
I20231214-11:54:54.029(1)? at getCurrentMethodInvocationResult (packages/ddp-server/livedata_server.js:772:38)
I20231214-11:54:54.030(1)? at packages/meteor.js:365:18
I20231214-11:54:54.030(1)? at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1389:31)
I20231214-11:54:54.030(1)? at packages/ddp-server/livedata_server.js:791:46
I20231214-11:54:54.030(1)? at new Promise (<anonymous>)
I20231214-11:54:54.030(1)? at Session.method (packages/ddp-server/livedata_server.js:739:23)
I20231214-11:54:54.030(1)? at packages/ddp-server/livedata_server.js:603:43
La méthode ne semble pas gérer le cas où l'utilisateur n'a pas encore de structure.
En profiter pour supprimer les console.log qui trainent dans la page AdminUsersPage.jsx (ligne 111/133/134)