Entities features: update the item metadata on relationship create/delete also when not using REST

on update this is causing problems with the place changes
This commit is contained in:
Ben Bosman
2020-06-25 18:10:16 +02:00
parent b39facf1d1
commit 612acbdc36

View File

@@ -90,6 +90,7 @@ public class RelationshipServiceImpl implements RelationshipService {
Relationship relationshipToReturn = relationshipDAO.create(context, relationship);
updatePlaceInRelationship(context, relationshipToReturn);
update(context, relationshipToReturn);
updateItemsInRelationship(context, relationship);
return relationshipToReturn;
} else {
throw new AuthorizeException(
@@ -307,7 +308,6 @@ public class RelationshipServiceImpl implements RelationshipService {
authorizeService.authorizeActionBoolean(context, relationship.getRightItem(), Constants.WRITE)) {
if (isRelationshipValidToCreate(context, relationship)) {
relationshipDAO.save(context, relationship);
updateItemsInRelationship(context, relationship);
}
} else {
throw new AuthorizeException("You do not have write rights on this relationship's items");