Skip to content

Commit

Permalink
add missing checks
Browse files Browse the repository at this point in the history
  • Loading branch information
Henry Fontanier authored and Henry Fontanier committed Nov 22, 2023
1 parent d5578d8 commit cdc39a9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions core/src/blocks/database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,21 @@ impl Database {
if !query.is_some() {
Err(anyhow!("Missing required `query` in `database` block"))?;
}
if !workspace_id.is_some() {
Err(anyhow!(
"Missing required `workspace_id` in `database` block"
))?;
}
if !data_source_id.is_some() {
Err(anyhow!(
"Missing required `data_source_id` in `database` block"
))?;
}
if !database_id.is_some() {
Err(anyhow!(
"Missing required `database_id` in `database` block"
))?;
}

Ok(Database {
query: query.unwrap(),
Expand Down

0 comments on commit cdc39a9

Please sign in to comment.