We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b6a41 commit 8caf261Copy full SHA for 8caf261
src/users/dashboards.rs
@@ -71,7 +71,9 @@ impl Dashboard {
71
self.dashboard_id = dashboard_id.or_else(|| Some(Ulid::new()));
72
self.version = Some(CURRENT_DASHBOARD_VERSION.to_string());
73
self.modified = Some(Utc::now());
74
- self.dashboard_type = Some(DashboardType::Dashboard);
+ if self.dashboard_type.is_none() {
75
+ self.dashboard_type = Some(DashboardType::Dashboard);
76
+ }
77
if self.tiles.is_none() {
78
self.tiles = Some(Vec::new());
79
}
@@ -240,7 +242,7 @@ impl Dashboards {
240
242
self.0
241
243
.write()
244
.await
- .retain(|d| d.dashboard_id.as_ref().is_none_or(|id| *id != dashboard_id));
245
+ .retain(|d| d.dashboard_id.map_or(true, |id| id != dashboard_id));
246
247
Ok(())
248
0 commit comments