Browse Source

bugfix: time editor failed when no end time was set

module/search
Stephan Richter 2 months ago
parent
commit
eaf5e54edf
  1. 1
      core/src/main/java/de/srsoftware/umbrella/core/model/Time.java

1
core/src/main/java/de/srsoftware/umbrella/core/model/Time.java

@ -115,6 +115,7 @@ public class Time implements Mappable{
} }
if (json.has(START_TIME) && json.get(START_TIME) instanceof Number st) start = st.longValue(); if (json.has(START_TIME) && json.get(START_TIME) instanceof Number st) start = st.longValue();
if (json.has(END_TIME) && json.get(END_TIME) instanceof Number e) end = e.longValue(); if (json.has(END_TIME) && json.get(END_TIME) instanceof Number e) end = e.longValue();
if (end == 0) end = null;
if (end != null && end < start) throw UmbrellaException.invalidFieldException(END_TIME,"after start_time"); if (end != null && end < start) throw UmbrellaException.invalidFieldException(END_TIME,"after start_time");
return this; return this;
} }

Loading…
Cancel
Save