Skip to content

Commit

Permalink
Avoid errors from EntityBroker on an adhoc-group (#164)
Browse files Browse the repository at this point in the history
(cherry picked from commit 9d2ae8c)
  • Loading branch information
ottenhoff committed Dec 12, 2024
1 parent b83592d commit 302ac71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@ public EvalGroup makeEvalGroupObject(String evalGroupId) {
}

EvalGroup c = null;
if (c == null) {
// check external
if (!evalGroupId.startsWith(EvalAdhocGroup.ADHOC_ID_PREFIX)) {
// check external as long as it doesn't start with "adhoc-group:"
c = externalLogic.makeEvalGroupObject(evalGroupId);
if (c != null && EvalConstants.GROUP_TYPE_INVALID.equals(c.type)) {
c = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,13 +609,13 @@ else if (evalGroupId.startsWith(EvalConstants.GROUP_ID_SITE_PREFIX)) {
}
} catch (Exception e) {
// invalid site reference
log.debug("Could not get sakai site from evalGroupId:" + evalGroupId, e);
log.debug("Could not get sakai site from evalGroupId:{}", evalGroupId, e);
c = null;
}
}

if (c == null) {
log.debug("Could not get group from evalGroupId:" + evalGroupId);
log.debug("Could not get group from evalGroupId:{}", evalGroupId);
// create a fake group placeholder as an error notice
c = new EvalGroup( evalGroupId, "** INVALID: "+evalGroupId+" **",
EvalConstants.GROUP_TYPE_INVALID );
Expand Down

0 comments on commit 302ac71

Please sign in to comment.