e42a83c39dd5335c8c05cbcdd105cc1b8d43fa04 — Thomas Letan 1 year, 3 months ago 8bd16df
fix: Update the raw text in addition to the rendered one
1 files changed, 1 insertions(+), 1 deletions(-)

M src/models/document.rs
M src/models/document.rs => src/models/document.rs +1 -1
@@ 121,7 121,7 @@ impl Document {
         let rendered = Document::render(&raw, &doc.language)?;
 
         diesel::update(documents::table.find(id.into(): i32))
-            .set(documents::rendered.eq(rendered))
+            .set((documents::raw.eq(raw), documents::rendered.eq(rendered)))
             .execute(conn.get())
             .chain_err(|| "still no")?;