Commit 4d06d7f
fix(lesson-editor): redirect to edit URL after first draft save to prevent duplicate lessons
When creating a new lesson and clicking Save Draft, the context had no
initialData so every subsequent save called createLesson again instead of
updateLesson. Fix: redirect to /lessons/:id after the first successful create
regardless of publish state, so the edit page loads with initialData set and
all further saves hit updateLesson.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 433e33b commit 4d06d7f
1 file changed
Lines changed: 4 additions & 0 deletions
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
| |||
0 commit comments