mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-27 23:59:20 -05:00
fix: editing an automation the model created can move its runs to other dates (#34443)
* fix: a repeating automation the model created opens with a Save button although nothing changed Opening a daily, weekly or monthly automation the model created in a chat showed Save right away, as if something had been edited, because the page took the start date such a schedule is saved with for a change of its own. Save now only shows once a field is edited. Fixes #34427 * fix: editing an automation the model created can move its runs to other dates An automation the model creates from a chat stores its repeating schedule with a start date. Editing only its name or another field on the automation's page dropped that start date. A schedule meant to start later then began running right away, and one that repeats every other week could move by a week. Editing other fields now leaves the schedule as it was, and changing the schedule itself saves the new one as before. Fixes #34430
This commit is contained in:
1 parent
c1dc41e80b
commit
457068f2e2
1 file changed
+3
-1
@@ -144,13 +144,15 @@
|
||||
}
|
||||
saving = true;
|
||||
try {
|
||||
const rrule = scheduleDropdown.buildRrule();
|
||||
const form: AutomationForm = {
|
||||
name: name.trim(),
|
||||
folder_id: target_type === 'channel' ? null : folder_id || null,
|
||||
data: {
|
||||
prompt: prompt.trim(),
|
||||
model_id: model_id.trim(),
|
||||
rrule: scheduleDropdown.buildRrule(),
|
||||
// An untouched schedule keeps its stored start date.
|
||||
rrule: rrule === savedRrule ? automation.data.rrule : rrule,
|
||||
terminal: terminalServerId
|
||||
? { server_id: terminalServerId, cwd: terminalCwd.trim() || undefined }
|
||||
: undefined,
|
||||
|
||||
Reference in new issue
Block a user