Set runNow to false when editing existing workflows (#1458)

Fixes #1339
This commit is contained in:
Tessa Walsh 2023-12-18 14:23:04 -05:00 committed by GitHub
parent 73e20269ef
commit 4fe014067e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -187,7 +187,7 @@ const getDefaultFormState = (): FormState => ({
minute: 0,
period: "AM",
},
runNow: true,
runNow: false,
jobName: "",
browserProfile: null,
tags: [],
@ -454,6 +454,9 @@ export class CrawlConfigEditor extends LiteElement {
private getInitialFormState(): FormState {
const defaultFormState = getDefaultFormState();
if (!this.configId) {
defaultFormState.runNow = true;
}
if (!this.initialWorkflow) return defaultFormState;
const formState: Partial<FormState> = {};
const seedsConfig = this.initialWorkflow.config;