From a110e8f2416745009dfb65902cfa3087d9ae1c99 Mon Sep 17 00:00:00 2001 From: Aiden McClelland Date: Mon, 2 Oct 2023 10:02:40 -0600 Subject: [PATCH] make migration more resilient --- backend/src/version/v0_3_5.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/src/version/v0_3_5.rs b/backend/src/version/v0_3_5.rs index e3a142470..19a85a345 100644 --- a/backend/src/version/v0_3_5.rs +++ b/backend/src/version/v0_3_5.rs @@ -72,6 +72,11 @@ impl VersionT for Version { { if let Some(url) = url_replacements.get(&dependency) { info.as_icon_mut().ser(url)?; + } else { + info.as_icon_mut().ser(&DataUrl::from_slice( + "image/png", + include_bytes!("../install/package-icon.png"), + ))?; } let manifest = <&mut Value>::from(&mut *info) .as_object_mut() @@ -84,6 +89,8 @@ impl VersionT for Version { .map(|s| s.to_owned()) { info.as_title_mut().ser(&title)?; + } else { + info.as_title_mut().ser(&dependency.to_string())?; } } }