Skip to content

Commit

Permalink
Merge pull request #239 from diging/develop
Browse files Browse the repository at this point in the history
Bug/vspc 177 (#238)
  • Loading branch information
jdamerow authored Aug 10, 2021
2 parents 9a2e418 + 1543e04 commit 68e32b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public class SpaceLink extends VSpaceElement implements ISpaceLink {
@JsonIgnore
@ManyToOne(targetEntity=Space.class)
@JoinColumn(name = "source_space_id")
@NotFound(action=NotFoundAction.IGNORE)
private ISpace sourceSpace;

@ManyToOne(targetEntity=Space.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,7 @@ public Iterable<Space> addIncomingLinkInfoToSpaces(Iterable<Space> spaces) {
Iterator<Space> iterator = spaces.iterator();
while (iterator.hasNext()) {
Space space = iterator.next();
try {
space.setIncomingLinks((spaceLinkRepo.findByTargetSpace(space)).size() > 0 ? true : false);
} catch (EntityNotFoundException ex) {
// if the data is incomplete this might happen (e.g. spaces used in links
// don't exist anymore.
space.setIncomingLinks(false);
logger.error("Could not load space links.", ex);
}
space.setIncomingLinks((spaceLinkRepo.findByTargetSpace(space)).size() > 0 ? true : false);
}
return spaces;
}
Expand Down

0 comments on commit 68e32b8

Please sign in to comment.