mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-13 02:58:17 -06:00
Shorten error message
This commit is contained in:
parent
db578bc3df
commit
288530b9f4
@ -138,15 +138,15 @@ class PluginConfig(AppConfig):
|
|||||||
min_version = version.parse(cls.min_version)
|
min_version = version.parse(cls.min_version)
|
||||||
if current_version < min_version:
|
if current_version < min_version:
|
||||||
raise ImproperlyConfigured(
|
raise ImproperlyConfigured(
|
||||||
f"Plugin {cls.__module__} requires NetBox minimum version {cls.min_version} but "
|
f"Plugin {cls.__module__} requires NetBox minimum version {cls.min_version} (current: "
|
||||||
f"this NetBox version is {netbox_version}."
|
f"{netbox_version})."
|
||||||
)
|
)
|
||||||
if cls.max_version is not None:
|
if cls.max_version is not None:
|
||||||
max_version = version.parse(cls.max_version)
|
max_version = version.parse(cls.max_version)
|
||||||
if current_version > max_version:
|
if current_version > max_version:
|
||||||
raise ImproperlyConfigured(
|
raise ImproperlyConfigured(
|
||||||
f"Plugin {cls.__module__} requires NetBox maximum version {cls.max_version} but "
|
f"Plugin {cls.__module__} requires NetBox maximum version {cls.max_version} (current: "
|
||||||
f"this NetBox version is {netbox_version}."
|
f"{netbox_version})."
|
||||||
)
|
)
|
||||||
|
|
||||||
# Verify required configuration settings
|
# Verify required configuration settings
|
||||||
|
Loading…
Reference in New Issue
Block a user