From 3ca86d2e448dcefeea72fa80f21b2298b6289864 Mon Sep 17 00:00:00 2001 From: Oscar Domingo Date: Tue, 16 Jan 2024 17:25:24 +0000 Subject: [PATCH] `metrics.bundles` Adapt `get_installed_addons` to the new `RezRepo` --- ayon_server/metrics/bundles.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ayon_server/metrics/bundles.py b/ayon_server/metrics/bundles.py index 54b7ab16..e9ee2a15 100644 --- a/ayon_server/metrics/bundles.py +++ b/ayon_server/metrics/bundles.py @@ -51,4 +51,10 @@ async def get_installed_addons(saturated: bool) -> list[tuple[str, str]]: """ rezrepo = RezRepo.get_instance() - return rezrepo.packages + installed_packages = [] + for package, package_dict in rezrepo.packages.items(): + for version in package_dict.get("versions"): + [[version_number, rez_package]] = version.items() + installed_packages.append((str(package), str(version_number))) + + return installed_packages