Restore the archived-term 409 on PATCH /terms/{id}, dropped by the term split
Browse files at this commit3c74f9a0570f03120eeb6405b587481dddfe85d0Parent: 6562e60- fix
- restore the archived-term 409 on PATCH /terms/{id}, dropped by the term split
1 changed file +1 -0
- src/web/terms.rs +1 -0
src/web/terms.rsmodified+1 -0
| @@ -181,6 +181,7 @@ async fn update_term( | |||
| 181 | let term = service::term::read(&st.db, &TermId::from_key(&id)) | 181 | let term = service::term::read(&st.db, &TermId::from_key(&id)) |
| 182 | .await? | 182 | .await? |
| 183 | .ok_or(AppError::NotFound)?; | 183 | .ok_or(AppError::NotFound)?; |
| 184 | + service::term::require_writable(&term)?; | ||
| 184 | // Pre-flight only: the range check is re-made inside the UPDATE's own | 185 | // Pre-flight only: the range check is re-made inside the UPDATE's own |
| 185 | // `WHERE` (the term update in the db layer), so a concurrent move of the | 186 | // `WHERE` (the term update in the db layer), so a concurrent move of the |
| 186 | // end this PATCH omits cannot slip an inverted range past this snapshot. | 187 | // end this PATCH omits cannot slip an inverted range past this snapshot. |