Skip to content

Commit

Permalink
Merge pull request #4297 from systeminit/zack/fix-workspace-new
Browse files Browse the repository at this point in the history
fix(*): fix workspace new
  • Loading branch information
zacharyhamm authored Aug 7, 2024
2 parents 9348826 + ad49ed8 commit cba9750
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/dal/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ impl TryFrom<PgRow> for Workspace {
uses_actions_v2: row.try_get("uses_actions_v2")?,
timestamp: Timestamp::assemble(created_at, updated_at),
token: row.try_get("token")?,
snapshot_version: dbg!(WorkspaceSnapshotGraphDiscriminants::from_str(
&snapshot_version
)?),
snapshot_version: WorkspaceSnapshotGraphDiscriminants::from_str(&snapshot_version)?,
})
}
}
Expand Down Expand Up @@ -314,13 +312,15 @@ impl Workspace {
.feature_is_enabled(&FeatureFlag::ActionsV2);

let name = name.as_ref();
let version_string = WorkspaceSnapshotGraphDiscriminants::V2.to_string();

let row = ctx
.txns()
.await?
.pg()
.query_one(
"INSERT INTO workspaces (pk, name, default_change_set_id, uses_actions_v2) VALUES ($1, $2, $3, $4) RETURNING *",
&[&pk, &name, &change_set_id, &uses_actions_v2],
"INSERT INTO workspaces (pk, name, default_change_set_id, uses_actions_v2, snapshot_version) VALUES ($1, $2, $3, $4, $5) RETURNING *",
&[&pk, &name, &change_set_id, &uses_actions_v2, &version_string],
)
.await?;
let new_workspace = Self::try_from(row)?;
Expand Down

0 comments on commit cba9750

Please sign in to comment.