Skip to content

Commit

Permalink
don't commit if db model does not match
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-bonez committed Jan 15, 2025
1 parent defeccf commit 9e88a21
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/startos/src/version/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use imbl_value::{to_value, InternedString};
use patch_db::json_ptr::ROOT;

use crate::context::RpcContext;
use crate::db::model::Database;
use crate::prelude::*;
use crate::Error;

Expand Down Expand Up @@ -53,6 +54,7 @@ impl Current {
let pre_ups = PreUps::load(&from, &self).await?;
db.apply_function(|mut db| {
migrate_from_unchecked(&from, &self, pre_ups, &mut db)?;
from_value::<Database>(db.clone())?;
Ok::<_, Error>((db, ()))
})
.await?;
Expand Down

0 comments on commit 9e88a21

Please sign in to comment.