Skip to content

Commit

Permalink
fix compile
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco committed Sep 29, 2023
1 parent bdcbd0e commit ee9a31d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion nexus/db-model/src/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ impl_enum_type!(
pub struct HwPowerStateEnum;

#[derive(Copy, Clone, Debug, AsExpression, FromSqlRow, PartialEq)]
#[diesel(sql_type = HwRotSlotEnum)]
#[diesel(sql_type = HwPowerStateEnum)]
pub enum HwPowerState;

// Enum values
Expand Down
10 changes: 7 additions & 3 deletions nexus/db-queries/src/db/datastore/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,15 +115,19 @@ impl DataStore {
baseboard_dsl::id,
sp.time_collected
.into_sql::<diesel::sql_types::Timestamptz>(),
sp.source.into_sql::<diesel::sql_types::Text>(),
sp.source
.clone()
.into_sql::<diesel::sql_types::Text>(),
i64::from(sp.baseboard_revision)
.into_sql::<diesel::sql_types::Int8>(),
sp.hubris_archive
.clone()
.into_sql::<diesel::sql_types::Text>(),
HwPowerState::from(sp.power_state).into_sql(),
HwPowerState::from(sp.power_state)
.into_sql::<HwPowerStateEnum>(),
));

diesel::insert_into(
let _ = diesel::insert_into(
db::schema::inv_service_processor::table,
)
.values(selection)
Expand Down
1 change: 1 addition & 0 deletions nexus/inventory/src/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ impl CollectionBuilder {
baseboard: baseboard.clone(),
time_collected: Utc::now(),
source: source.to_owned(),
baseboard_revision: sp_state.revision,
hubris_archive: sp_state.hubris_archive_id,
power_state: sp_state.power_state,
rot,
Expand Down

0 comments on commit ee9a31d

Please sign in to comment.