diff options
author | Vijay Raghavan Aravamudhan <vraravam@users.noreply.github.com> | 2021-08-12 16:58:34 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 22:28:34 +0530 |
commit | 6ab55ebcb758103841463aec404f38aa424a53ef (patch) | |
tree | 0b53b20d0c4ef64f54dfdcd3da190c4e27ac4ad8 /src/internal-server | |
parent | Services now support aliases!!!! (#1774) (diff) | |
download | ferdium-app-6ab55ebcb758103841463aec404f38aa424a53ef.tar.gz ferdium-app-6ab55ebcb758103841463aec404f38aa424a53ef.tar.zst ferdium-app-6ab55ebcb758103841463aec404f38aa424a53ef.zip |
Fix error while importing without workspaces (#1776)
fixes #1773
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, |