huskies: merge 888
This commit is contained in:
@@ -17,12 +17,14 @@ pub(crate) fn write_story_content(
|
||||
stage: &str,
|
||||
content: &str,
|
||||
) {
|
||||
crate::db::write_item_with_content(
|
||||
story_id,
|
||||
stage,
|
||||
content,
|
||||
crate::db::ItemMeta::from_yaml(content),
|
||||
);
|
||||
let mut meta = crate::db::ItemMeta::from_yaml(content);
|
||||
// CRDT is the single source of truth for depends_on. Never overwrite the
|
||||
// register from YAML here — the typed setter (crdt_state::set_depends_on)
|
||||
// is the only authorised write path. Passing None leaves the existing
|
||||
// register untouched on update and initialises new items to "" so the
|
||||
// explicit set_depends_on call in each create function takes effect.
|
||||
meta.depends_on = None;
|
||||
crate::db::write_item_with_content(story_id, stage, content, meta);
|
||||
}
|
||||
|
||||
/// Determine what stage a story is in (from CRDT).
|
||||
|
||||
Reference in New Issue
Block a user