Commit 0686d3a21b38f459efe0094b965cfff2b95c4345
Committed by
Andrew Shvayka
1 parent
8e590a52
fixed conflicts
Showing
1 changed file
with
8 additions
and
2 deletions
... | ... | @@ -279,8 +279,14 @@ public class TelemetryController extends BaseController { |
279 | 279 | deleteFromTs = 0L; |
280 | 280 | deleteToTs = System.currentTimeMillis(); |
281 | 281 | } else { |
282 | - deleteFromTs = startTs; | |
283 | - deleteToTs = endTs; | |
282 | + if (startTs == null || endTs == null) { | |
283 | + deleteToTs = endTs; | |
284 | + return getImmediateDeferredResult("When deleteAllDataForKeys is false, start and end timestamp values shouldn't be empty", HttpStatus.BAD_REQUEST); | |
285 | + } | |
286 | + else{ | |
287 | + deleteFromTs = startTs; | |
288 | + deleteToTs = endTs; | |
289 | + } | |
284 | 290 | } |
285 | 291 | |
286 | 292 | return accessValidator.validateEntityAndCallback(user, entityIdStr, (result, tenantId, entityId) -> { | ... | ... |