fix: bulk update updating linked content (#6517)

* fix: bulk update updating linked content

* fix: disabled content sometimes desyncing

* fix: bad filter

* fix: fmt
This commit is contained in:
Calum H.
2026-06-26 17:50:15 +02:00
committed by GitHub
parent e4376c2b15
commit ebf4a6ef5f
9 changed files with 114 additions and 22 deletions
@@ -661,13 +661,31 @@ pub(crate) async fn toggle_disable_project(
}
None => index_existing_file(&scope, &new_path, state).await?,
};
content_rows::set_content_entry_enabled_for_file(
let updated_entry = content_rows::set_content_entry_enabled_for_file(
&scope.content_set_id,
&file.id,
enabled,
&state.pool,
)
.await?;
if !updated_entry {
let project_type = ProjectType::get_from_parent_folder(&new_path)
.ok_or_else(|| {
crate::ErrorKind::InputError(format!(
"Unable to infer project type from {new_path}"
))
})?;
upsert_entry_for_file(
&scope,
&file,
project_type,
None,
None,
ContentSourceKind::Local,
&state.pool,
)
.await?;
}
Ok(new_path)
}