diff --git a/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts b/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts index c55027d10c..e850215928 100644 --- a/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts +++ b/ui-ngx/src/app/modules/home/components/import-export/import-export.service.ts @@ -406,6 +406,9 @@ export class ImportExportService { public importRuleChain(expectedRuleChainType: RuleChainType): Observable { return this.openImportDialog('rulechain.import', 'rulechain.rulechain-file').pipe( mergeMap((ruleChainImport: RuleChainImport) => { + if (isUndefined(ruleChainImport.ruleChain.type)) { + ruleChainImport.ruleChain.type = ruleChainType.core; + } if (!this.validateImportedRuleChain(ruleChainImport)) { this.store.dispatch(new ActionNotificationShow( {message: this.translate.instant('rulechain.invalid-rulechain-file-error'), @@ -469,9 +472,6 @@ export class ImportExportService { || isUndefined(ruleChainImport.ruleChain.name)) { return false; } - if (isUndefined(ruleChainImport.ruleChain.type)) { - ruleChainImport.ruleChain.type = ruleChainType.core; - } return true; }