pierrejeambrun commented on code in PR #47790:
URL: https://github.com/apache/airflow/pull/47790#discussion_r2000469308
##########
airflow/ui/src/queries/useCreateBackfill.ts:
##########
@@ -50,7 +50,7 @@ export const useCreateBackfill = ({ onSuccessConfirm }: {
onSuccessConfirm: () =
const dataIntervalEnd = new Date(data.requestBody.to_date);
const dagId = data.requestBody.dag_id;
- if (!Boolean(dataIntervalStart) || !Boolean(dataIntervalEnd)) {
+ if (isNaN(dataIntervalStart.getTime()) ||
isNaN(dataIntervalEnd.getTime())) {
Review Comment:
How can `dataIntervalStart` or `dataIntervalEnd` be malformed string ? (Date
constructor as well as the input field should guarantee that we are
manipulating a valid date / datetime I think, I might be missing something)
Is that to handle the case where `from_date` or `to_date` are `date` instead
of `datetime` ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]