[ml] Fix start datafeed validation
relates elastic/x-pack-elasticsearch#596
Original commit: elastic/x-pack-elasticsearch@103fd7f2b4772aed1dfb786bd64054e9bb0f30c2
@@ -346,10 +346,6 @@ public class StartDatafeedAction
throw ExceptionsHelper.missingJobException(datafeed.getJobId());
}
DatafeedJobValidator.validate(datafeed, job);
- if (tasks == null) {
- return;
- }
-
JobState jobState = MlMetadata.getJobState(datafeed.getJobId(), tasks);
if (jobState != JobState.OPENED) {
throw new ElasticsearchStatusException("cannot start datafeed, expected job state [{}], but got [{}]",
