fix Error code 500 in Relation.find without type (NullPointerException) #109

Merged
hsh-michaelhoennig merged 4 commits from fix-relation-find-by-any-type into master 2024-09-27 11:01:03 +02:00
Showing only changes of commit 20c7761e46 - Show all commits

View File

@ -52,7 +52,7 @@ public class HsOfficeRelationController implements HsOfficeRelationsApi {
context.define(currentSubject, assumedRoles);
final var entities = relationRbacRepo.findRelationRelatedToPersonUuidAndRelationType(personUuid,
relationType == null ? null : HsOfficeRelationType.valueOf(relationType.name()));
relationType == null ? null : HsOfficeRelationType.valueOf(relationType.name()));
final var resources = mapper.mapList(entities, HsOfficeRelationResource.class,
RELATION_ENTITY_TO_RESOURCE_POSTMAPPER);