File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed
src/main/java/org/woehlke/simpleworklist/common/domain Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 6565* fixed #326 add Context to Breadcrumb
6666* Issue #327 AbstractController: rename rootCategories to rootProjects (line 77)
6767* Issue #328 AbstractController: rename allCategories to allProjects (line 66)
68- * Issue #329 AbstractController: remove side effects from getContext (line 145, 159)
68+ * fixed #329 AbstractController: remove side effects from getContext (line 145, 159)
6969* Issue #330 Add Project to Root Project: preset correct Context
7070
7171## 2.3.35
Original file line number Diff line number Diff line change @@ -144,14 +144,13 @@ protected UserAccount getUser() {
144144
145145 protected Context getContext (@ NotNull final UserSessionBean userSession ){
146146 UserAccount thisUser = this .getUser ();
147- //if(userSession == null){
148- // userSession = new UserSessionBean();
149- //}
150147 long defaultContextId = thisUser .getDefaultContext ().getId ();
151- //userSession.setLastContextId(defaultContextId);
152- Context context = contextService .findByIdAndUserAccount (userSession .getLastContextId (), thisUser );
153- //userSession.setLastContextId(context.getId());
154- //userSession.setUserAccountid(thisUser.getId());
148+ long userSessionLastContextId = userSession .getLastContextId ();
149+ long newContextId = userSessionLastContextId ;
150+ if (userSessionLastContextId == 0L ){
151+ newContextId = defaultContextId ;
152+ }
153+ Context context = contextService .findByIdAndUserAccount (newContextId , thisUser );
155154 return context ;
156155 }
157156
You can’t perform that action at this time.
0 commit comments