Updated ui for variant and label and fixed error with loading labe for variant.
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user