File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
src/main/java/uk/gov/hmcts/pdda/crlivestatus Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -142,12 +142,10 @@ public boolean updatePublicDisplayStatus(CourtLogViewValue courtLogViewValue) {
142142 XhbCrLiveDisplayDao displayDao = xhbCrLiveDisplayDao .get ();
143143 LOG .debug ("XhbCrLiveDisplayDao found with ID: {}" , displayDao .getCrLiveDisplayId ());
144144
145- LocalDate timeStatusSetDate = displayDao .getTimeStatusSet ().toLocalDate ();
146- LocalDate today = LocalDate .now ();
147-
148- boolean isTimeNotAfter = !displayDao .getTimeStatusSet ().isAfter (entryDateTime );
149- boolean isTimeFromToday = timeStatusSetDate .isEqual (today );
150- if (isTimeNotAfter && isTimeFromToday ) {
145+ boolean isEventTimeAfterLastUpdate = entryDateTime .isAfter (displayDao .getTimeStatusSet ());
146+ boolean isEventTimeFromToday = entryDateTime .toLocalDate ().isEqual (LocalDate .now ());
147+
148+ if (isEventTimeAfterLastUpdate && isEventTimeFromToday ) {
151149 LOG .debug ("CRLive - Updating existing XhbCrLiveDisplayDao with ID: {}" ,
152150 displayDao .getCrLiveDisplayId ());
153151 displayDao .setTimeStatusSet (entryDateTime );
You can’t perform that action at this time.
0 commit comments