Fix measurement-list without endtime option fails
Change-Id: Idfbb5eacc196cbebe9e0dea4f10715093e95cbe5 Closes-Bug: #1523354
This commit is contained in:
parent
86c6d55af7
commit
a4e3cbf859
|
@ -150,7 +150,7 @@ public final class Validation {
|
|||
* @throws WebApplicationException if the {@code startTime} or {@code endTime} are invalid
|
||||
*/
|
||||
public static void validateTimes(DateTime startTime, DateTime endTime) {
|
||||
if (!startTime.isBefore(endTime))
|
||||
if (endTime != null && !startTime.isBefore(endTime))
|
||||
throw Exceptions.badRequest("start_time (%s) must be before end_time (%s)", startTime, endTime);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue