Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/handlers/http/users/dashboards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,7 @@ pub async fn update_dashboard(

// Validate: either query params OR body, not both
let has_query_params = !query_map.is_empty();
let has_body_update = dashboard
.as_ref()
.is_some_and(|d| d.title != existing_dashboard.title || d.tiles.is_some());
let has_body_update = dashboard.is_some();

if has_query_params && has_body_update {
return Err(DashboardError::Metadata(
Expand Down
3 changes: 3 additions & 0 deletions src/users/dashboards.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ pub struct Dashboard {
dashboard_type: Option<DashboardType>,
pub tiles: Option<Vec<Tile>>,
pub tenant_id: Option<String>,
/// all other fields are variable and can be added as needed
#[serde(flatten)]
pub other_fields: Option<serde_json::Map<String, Value>>,
}

impl MetastoreObject for Dashboard {
Expand Down
Loading