Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Sep 4, 2019
2 parents a00609e + b1e622f commit 9afd513
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -396,9 +396,8 @@ protected Integer load() {
ObjectQuery query = QueryUtils.filterForAssignees(q, getPrincipal(),
OtherPrivilegesLimitationType.F_APPROVAL_WORK_ITEMS, getRelationRegistry())
.and()
.not()
.item(PrismConstants.T_PARENT, CaseType.F_STATE)
.eq(SchemaConstants.CASE_STATE_CLOSED)
.item(CaseWorkItemType.F_CLOSE_TIMESTAMP)
.isNull()
.build();
return getModelService().countContainers(CaseWorkItemType.class, query, null, task, task.getResult());
} catch (SchemaException | SecurityViolationException | ExpressionEvaluationException | ObjectNotFoundException | CommunicationException | ConfigurationException e) {
Expand Down
Expand Up @@ -258,6 +258,10 @@ private List<ShadowWrapper> loadShadowWrappers(boolean noFetch) {

Task task = createSimpleTask(OPERATION_LOAD_SHADOW);
for (PrismReferenceValue reference : references) {
if(reference == null || (reference.getOid() == null && reference.getTargetType() == null)) {
LOGGER.trace("Skiping reference for shadow with null oid");
continue; // default value
}
OperationResult subResult = task.getResult().createMinorSubresult(OPERATION_LOAD_SHADOW);
PrismObject<ShadowType> projection = getPrismObjectForWrapper(ShadowType.class, reference.getOid(),
noFetch, task, subResult, createLoadOptionForShadowWrapper());
Expand Down

0 comments on commit 9afd513

Please sign in to comment.