Skip to content

Commit e844187

Browse files
authored
Merge pull request #64 from mendix/get-track-hit-count-with-sudo-context
Use sudo context when we are getting trackHitCount attribute
2 parents 2d49dc5 + 6c238f3 commit e844187

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

0 Bytes
Binary file not shown.

src/DeepLinkModule/javasource/deeplink/actions/ExecuteDeeplink.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,10 +122,10 @@ public java.lang.Boolean executeAction() throws Exception
122122
Core.delete(this.getContext(), this.pendinglink.getMendixObject());
123123
}
124124

125-
if(link.getTrackHitCount()) {
125+
IContext sudoContext = getContext().createSudoClone();
126+
if(link.getTrackHitCount(sudoContext)) {
126127
//set hitcount (note, this might not be exact)
127-
IContext sudoContext = getContext().createSudoClone();
128-
link.setHitCount(sudoContext, link.getHitCount(getContext().createSudoClone()) + 1);
128+
link.setHitCount(sudoContext, link.getHitCount(sudoContext) + 1);
129129
Core.commit(sudoContext, link.getMendixObject());
130130
}
131131
return true;

0 commit comments

Comments
 (0)