From f70c55e0026f08cd166d10b063df69100e8b4536 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alo=C3=AFs=20Micard?= Date: Tue, 26 Aug 2025 17:30:23 +0200 Subject: [PATCH] [PATCH] Fix: Allow VM disk sizes in Megabytes Co-authored-by: eliba See: https://github.com/creekorful/netbox-pve-sync/pull/9 --- netbox_pve_sync/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox_pve_sync/__init__.py b/netbox_pve_sync/__init__.py index de581bd..7117fe2 100644 --- a/netbox_pve_sync/__init__.py +++ b/netbox_pve_sync/__init__.py @@ -391,6 +391,8 @@ def _process_pve_disk_size(_raw_disk_size: str) -> int: size = _raw_disk_size[:-1] size_unit = _raw_disk_size[-1] + if size_unit == 'M': + return int(size) if size_unit == 'G': return int(size) * 1_000 if size_unit == 'T':