From 69194192d062f31c039ed65f6dc829e203e2c384 Mon Sep 17 00:00:00 2001 From: yelinz Date: Wed, 2 Aug 2023 13:20:23 +0200 Subject: [PATCH] fix(ember): fix member list not displaying roles --- ember/app/models/identity.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ember/app/models/identity.js b/ember/app/models/identity.js index c61ff9cd9..486bb2f36 100644 --- a/ember/app/models/identity.js +++ b/ember/app/models/identity.js @@ -41,6 +41,17 @@ export default class IdentityModel extends LocalizedModel { return this.roles.map((role) => { role.timeSlot = role.time_slot; role.inactive = membershipInactive(role); + + // resolve a default if translations are not set + if (role.role) { + const nonEmptyValue = Object.values(role.role).find((value) => value); + Object.keys(role.role).forEach((key) => { + if (!role.role[key]) { + role.role[key] = nonEmptyValue; + } + }); + } + return role; }); }