Lot S : tests serveur repris sans Propositions seed en vigueur (modules, overview), rustfmt

modules.rs : 0 article en vigueur et 35 propositions en cours dans une base
neuve (I1, E1 et E2 sont des Propositions seed) ; l'ajout des modules à une
base existante se rejoue sur le seed de production du 02/11 (textes en
vigueur), comme inertia.rs. overview.rs : le vote porte sur la Proposition
seed I1 ; 41 modules à voter, inchangé.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-11-03 04:12:20 +01:00
co-authored by Claude Opus 5.5
parent ef461617de
commit aaa653e1a7
7 changed files with 49 additions and 22 deletions
+4 -5
View File
@@ -198,7 +198,9 @@ fn check(seed: &SeedDoc) -> anyhow::Result<()> {
anyhow::bail!("{}: a seed proposal is open, never in force", u.code);
}
match (u.puts_forward(), u.inertia.is_some()) {
(true, true) => anyhow::bail!("{}: a seed proposal starts at SEED_PROPOSAL_LEVEL, give it no level", u.code),
(true, true) => {
anyhow::bail!("{}: a seed proposal starts at SEED_PROPOSAL_LEVEL, give it no level", u.code)
}
(false, false) => anyhow::bail!("{}: no level of inertia", u.code),
_ => {}
}
@@ -273,10 +275,7 @@ async fn instantiate(state: &AppState, seed: &SeedDoc, inst: &SeedInstance) -> a
.await?;
// The mark, written apart: only where the seed puts the version forward.
if v.seed_proposal && status == "open" {
sqlx::query("UPDATE proposals SET seed_featured = 1 WHERE id = ?")
.bind(&pid)
.execute(&mut *tx)
.await?;
sqlx::query("UPDATE proposals SET seed_featured = 1 WHERE id = ?").bind(&pid).execute(&mut *tx).await?;
}
if status == "in_force" {
sqlx::query("UPDATE units SET in_force_id = ? WHERE id = ?")
+5 -1
View File
@@ -247,7 +247,11 @@ fn target_of<'a>(seeds: &'a [SeedDoc], a: &Amendment) -> Option<(&'a SeedDoc, &'
}
/// What the database says of a version holding `status` (`None`: it does not).
pub(crate) async fn facts(conn: &mut SqliteConnection, proposal_id: &str, status: &str) -> anyhow::Result<Option<Facts>> {
pub(crate) async fn facts(
conn: &mut SqliteConnection,
proposal_id: &str,
status: &str,
) -> anyhow::Result<Option<Facts>> {
#[derive(sqlx::FromRow)]
struct Row {
origin: String,