Skip to content

Commit 7ccf900

Browse files
committed
work
1 parent 73b0e5f commit 7ccf900

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/woehlke/java/simpleworklist/domain/AbstractController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,15 @@ protected UserSessionBean updateUserSession(UserSessionBean userSession){
187187

188188
protected Project addProjectFromTaskToModel(Task task, Model model){
189189
Project thisProject;
190-
if (task.getProject() == null || task.getProject().getId() == 0L ) {
190+
if (task.getProject() == null || task.getProject().getId() == null || task.getProject().getId() == 0L) {
191191
thisProject = new Project();
192192
thisProject.setId(0L);
193193
} else {
194194
thisProject = task.getProject();
195195
}
196196
model.addAttribute("thisProject", thisProject);
197197
Project lastProject;
198-
if (task.getLastProject() == null || task.getLastProject().getId() == 0L) {
198+
if (task.getLastProject() == null || task.getLastProject().getId() == null || task.getLastProject().getId() == 0L) {
199199
lastProject = new Project();
200200
lastProject.setId(0L);
201201
} else {

0 commit comments

Comments
 (0)