The old_version field only exists for upgrades, not e.g. new
installations. We already had this change in proxmox-yew-comp,
but it seems we forgot to change it here.

Signed-off-by: Dietmar Maurer <[email protected]>
---
 proxmox-apt-api-types/src/lib.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxmox-apt-api-types/src/lib.rs b/proxmox-apt-api-types/src/lib.rs
index 7fe9ad82..58bd1973 100644
--- a/proxmox-apt-api-types/src/lib.rs
+++ b/proxmox-apt-api-types/src/lib.rs
@@ -307,7 +307,8 @@ pub struct APTUpdateInfo {
     /// New version to be updated to
     pub version: String,
     /// Old version currently installed
-    pub old_version: String,
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub old_version: Option<String>,
     /// Package origin
     pub origin: String,
     /// Package priority in human-readable form
-- 
2.47.3


_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to