mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Fix interpretation of day of week in automation form
This commit is contained in:
parent
c837f3779e
commit
1a5405e24c
1 changed files with 2 additions and 1 deletions
|
@ -83,6 +83,7 @@ function getEveryBlahFromCron(cron: string) {
|
|||
|
||||
function getDayOfWeekFromCron(cron: string) {
|
||||
const cronParts = cron.split(' ');
|
||||
console.log(cronParts);
|
||||
if (cronParts[3] === '*' && cronParts[4] !== '*') {
|
||||
return Number(cronParts[4]);
|
||||
}
|
||||
|
@ -631,7 +632,7 @@ function AutomationModificationForm(props: AutomationModificationFormProps) {
|
|||
<FormItem
|
||||
className='w-full'>
|
||||
<FormLabel>Day of Week</FormLabel>
|
||||
<Select onValueChange={field.onChange} defaultValue={String(field.value)}>
|
||||
<Select onValueChange={(value) => field.onChange(Number(value))} defaultValue={String(field.value)}>
|
||||
<FormControl>
|
||||
<SelectTrigger className='w-[200px]'>
|
||||
On <SelectValue placeholder="" />
|
||||
|
|
Loading…
Reference in a new issue