Updated ui for variant and label and fixed error with loading labe for variant.

This commit is contained in:
2026-01-31 18:47:30 +01:00
parent cb39f7ad32
commit 2ab51420dc
5 changed files with 61 additions and 13 deletions
+9 -1
View File
@@ -19,7 +19,15 @@ pub struct Variant {
}
async fn from_postgres_row(row: PgRow, pool: &PgPool) -> Variant {
let label = load_label(row.get(0), pool).await;
let label_id_option: Option<i64> = row.get(8);
let label: Option<Label> = match label_id_option {
Some(label_id) => {
load_label(label_id, pool).await
}
None => {
None
}
};
Variant {
id: row.get(0),