diff options
Diffstat (limited to 'src/internal-server')
-rw-r--r-- | src/internal-server/app/Controllers/Http/UserController.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/internal-server/app/Controllers/Http/UserController.js b/src/internal-server/app/Controllers/Http/UserController.js index 88c0deade..a3ad736fa 100644 --- a/src/internal-server/app/Controllers/Http/UserController.js +++ b/src/internal-server/app/Controllers/Http/UserController.js | |||
@@ -346,7 +346,9 @@ class UserController { | |||
346 | workspaceId = uuid(); | 346 | workspaceId = uuid(); |
347 | } while ((await Workspace.query().where('workspaceId', workspaceId).fetch()).rows.length > 0); // eslint-disable-line no-await-in-loop | 347 | } while ((await Workspace.query().where('workspaceId', workspaceId).fetch()).rows.length > 0); // eslint-disable-line no-await-in-loop |
348 | 348 | ||
349 | const services = workspace.services.map((service) => serviceIdTranslation[service]); | 349 | const services = (workspace.services && typeof (workspace.services) === 'object') ? |
350 | workspace.services.map((service) => serviceIdTranslation[service]) : | ||
351 | []; | ||
350 | 352 | ||
351 | await Workspace.create({ // eslint-disable-line no-await-in-loop | 353 | await Workspace.create({ // eslint-disable-line no-await-in-loop |
352 | workspaceId, | 354 | workspaceId, |