Minor bugfix
This commit is contained in:
parent
fcbb0dfdf8
commit
916557db0a
|
@ -82,7 +82,7 @@ public class InvitationsManager {
|
|||
Unmarshaller unmarshaller = context.createUnmarshaller();
|
||||
Properties properties = (Properties) unmarshaller.unmarshal(new StringReader(invitation.getProperties()));
|
||||
UserInfo invitedUser = apiContext.getOperationsContext().getDatabaseRepository().getUserInfoDao().find(principal.getId());
|
||||
QueryableList<UserDMP> userDMPQueryableList = apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where(((builder, root) -> builder.and(builder.equal(root.get("dmp").get("id"), invitation.getDmp().getId()), builder.equal(root.get("user").get("id"), invitation.getUser().getId()))));
|
||||
QueryableList<UserDMP> userDMPQueryableList = apiContext.getOperationsContext().getDatabaseRepository().getUserDmpDao().asQueryable().where(((builder, root) -> builder.and(builder.equal(root.get("dmp").get("id"), invitation.getDmp().getId()), builder.equal(root.get("user").get("id"), invitedUser.getId()))));
|
||||
UserDMP existingUserDMP = userDMPQueryableList.getSingleOrDefault();
|
||||
if (existingUserDMP != null) {
|
||||
if (properties.getRole() != null && existingUserDMP.getRole() > properties.getRole()) {
|
||||
|
|
Loading…
Reference in New Issue