Skip to content

Commit

Permalink
[ML] fix typo, clean up calendars
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Nov 28, 2019
1 parent 15a2d28 commit b153888
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export const Page: FC<PageProps> = ({ existingJobsAndGroups, jobType }) => {

if (mlJobService.tempJobCloningObjects.calendars) {
jobCreator.calendars = mlJobService.tempJobCloningObjects.calendars;
mlJobService.tempJobCloningObjects.calendars = undefined;
}
} else {
// creating a new job
Expand Down
2 changes: 1 addition & 1 deletion x-pack/legacy/plugins/ml/server/routes/calendars.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export function calendars({ commonRouteConfig, elasticsearchPlugin, route }) {
handler(request) {
const callWithRequest = callWithRequestFactory(elasticsearchPlugin, request);
const calendarIds = request.params.calendarIds.split(',');
if (calendarIds.leading === 1) {
if (calendarIds.length === 1) {
return getCalendar(callWithRequest, calendarIds[0])
.catch(resp => wrapError(resp));
} else {
Expand Down

0 comments on commit b153888

Please sign in to comment.