Skip to content

Commit

Permalink
Hotfix substitutes
Browse files Browse the repository at this point in the history
  • Loading branch information
PAException committed Nov 27, 2023
1 parent 1a9fa51 commit 5a0abf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public boolean sameBase(SubstituteDTO dto) {
if (lesson != dto.lesson) return false;
if (!Objects.equals(className, dto.className)) return false;

if (!Character.isDigit(className.charAt(0))) { //Only for E1 - Q4
if (className != null && !Character.isDigit(className.charAt(0))) { //Only for E1 - Q4
return Objects.equals(teacher, dto.teacher);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private static String getSubstituteTitle(SubstituteNotificationDTO substitute, b
} else if (DateUtils.isSameDay(substitute.getDate(), Date.from(Instant.now().plus(Duration.ofDays(1))))) {
relationalDay = "morgen";
} else {
relationalDay = "den " + DateTimeFormatter.ofPattern("dd.MM.").format(substitute.getDate().toInstant());
relationalDay = "den " + DateTimeFormatter.ofPattern("dd.MM.").format(substitute.getDate().toLocalDate());
}

return actuality + " Vertretung für " + relationalDay;
Expand Down

0 comments on commit 5a0abf9

Please sign in to comment.