From d0599930efcfd677e3445503a0b0eb80f8f58de2 Mon Sep 17 00:00:00 2001 From: Pavel Lavrukhin <46395539+dantte-lp@users.noreply.github.com> Date: Wed, 17 Dec 2025 01:26:36 +0300 Subject: [PATCH] Fix JSON serialization error in get_installed_apps() Skip non-serializable VERSION attributes when building the installed apps dictionary for /api/status/. Some packages using setuptools-scm define VERSION as a type placeholder (e.g., `object`) at runtime rather than an actual version tuple or string, causing "Object of type type is not JSON serializable" errors. This change adds a check to skip any VERSION value that is neither a tuple nor a string, preventing serialization failures while still correctly handling standard version formats. --- netbox/utilities/apps.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netbox/utilities/apps.py b/netbox/utilities/apps.py index b5445c8c403..119adf4a39a 100644 --- a/netbox/utilities/apps.py +++ b/netbox/utilities/apps.py @@ -11,6 +11,9 @@ def get_installed_apps(): if version := getattr(app, 'VERSION', getattr(app, '__version__', None)): if type(version) is tuple: version = '.'.join(str(n) for n in version) + elif not isinstance(version, str): + # Skip non-serializable version types (e.g. setuptools-scm placeholders) + continue installed_apps[app_config.name] = version return { k: v for k, v in sorted(installed_apps.items())