forge
Explore
Log in

Don't you dare go Hollow

Restore the archived-term 409 on PATCH /terms/{id}, dropped by the term split

Browse files at this commit

3c74f9a0570f03120eeb6405b587481dddfe85d0Ahmet Kaan GümüşParent: 6562e60
  • fix
    • restore the archived-term 409 on PATCH /terms/{id}, dropped by the term split
Show full message
🧹 fix: restore the archived-term 409 on PATCH /terms/{id}, dropped by the term split
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 own185 // 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 the186 // `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.