diff --git a/dmp-backend/core/src/main/java/eu/eudat/model/persist/referencetypedefinition/AuthenticationConfigurationPersist.java b/dmp-backend/core/src/main/java/eu/eudat/model/persist/referencetypedefinition/AuthenticationConfigurationPersist.java index 457355845..c0320314d 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/model/persist/referencetypedefinition/AuthenticationConfigurationPersist.java +++ b/dmp-backend/core/src/main/java/eu/eudat/model/persist/referencetypedefinition/AuthenticationConfigurationPersist.java @@ -113,23 +113,23 @@ public class AuthenticationConfigurationPersist { .must(() -> !this.isNull(item.getEnabled())) .failOn(AuthenticationConfigurationPersist._enabled).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._enabled}, LocaleContextHolder.getLocale())), this.spec() - .iff(() -> !this.isNull(item.getEnabled())) + .iff(item::getEnabled) .must(() -> !this.isEmpty(item.getAuthUrl())) .failOn(AuthenticationConfigurationPersist._authUrl).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authUrl}, LocaleContextHolder.getLocale())), this.spec() - .iff(() -> !this.isNull(item.getEnabled())) + .iff(item::getEnabled) .must(() -> !this.isNull(item.getAuthMethod())) .failOn(AuthenticationConfigurationPersist._authMethod).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authMethod}, LocaleContextHolder.getLocale())), this.spec() - .iff(() -> !this.isNull(item.getEnabled())) + .iff(item::getEnabled) .must(() -> !this.isEmpty(item.getAuthTokenPath())) .failOn(AuthenticationConfigurationPersist._authTokenPath).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authTokenPath}, LocaleContextHolder.getLocale())), this.spec() - .iff(() -> !this.isNull(item.getEnabled())) + .iff(item::getEnabled) .must(() -> !this.isEmpty(item.getAuthRequestBody())) .failOn(AuthenticationConfigurationPersist._authRequestBody).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._authRequestBody}, LocaleContextHolder.getLocale())), this.spec() - .iff(() -> !this.isNull(item.getEnabled())) + .iff(item::getEnabled) .must(() -> !this.isEmpty(item.getType())) .failOn(AuthenticationConfigurationPersist._type).failWith(messageSource.getMessage("Validation_Required", new Object[]{AuthenticationConfigurationPersist._type}, LocaleContextHolder.getLocale())) ); diff --git a/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.ts b/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.ts index 336f5509a..c9e6a0c0b 100644 --- a/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.ts +++ b/dmp-frontend/src/app/ui/admin/reference-type/editor/reference-type-editor.component.ts @@ -114,7 +114,7 @@ export class ReferenceTypeEditorComponent extends BaseEditor source.queries?.forEach(query => { query?.cases?.forEach(queryCase => { - this.selectedReferenceTypeChanged(queryCase.referenceType.id); + if(queryCase.referenceType && queryCase.referenceType.id) this.selectedReferenceTypeChanged(queryCase.referenceType.id); }) })); } @@ -163,9 +163,9 @@ export class ReferenceTypeEditorComponent extends BaseEditor