ui: updated schedule interval to send undefine when none is selected (#12990)

This commit is contained in:
Shailesh Parmar 2023-08-24 16:27:10 +05:30 committed by GitHub
parent ff6dccdb16
commit 08461fa9fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@
import { Form, Input, Typography } from 'antd';
import IngestionWorkflowForm from 'components/IngestionWorkflowForm/IngestionWorkflowForm';
import { LOADING_STATE } from 'enums/common.enum';
import { isUndefined, omit, trim } from 'lodash';
import { isEmpty, isUndefined, omit, trim } from 'lodash';
import React, { useMemo, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { STEPS_FOR_ADD_INGESTION } from '../../constants/Ingestions.constant';
@ -132,7 +132,9 @@ const AddIngestion = ({
const ingestionDetails: CreateIngestionPipeline = {
airflowConfig: {
scheduleInterval,
scheduleInterval: isEmpty(scheduleInterval)
? undefined
: scheduleInterval,
startDate: date,
retries: extraData.retries,
},
@ -179,7 +181,9 @@ const AddIngestion = ({
...data,
airflowConfig: {
...data.airflowConfig,
scheduleInterval,
scheduleInterval: isEmpty(scheduleInterval)
? undefined
: scheduleInterval,
retries: extraData.retries,
},
loggerLevel: workflowData?.enableDebugLog