From 6e34119f852a6c221e86823560f1ffa21b9df3c0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 12 Nov 2021 02:05:41 +0100 Subject: [PATCH] nicer model name --- InvenTree/plugin/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/InvenTree/plugin/models.py b/InvenTree/plugin/models.py index 2aa587d8a4..1749ea8cd8 100644 --- a/InvenTree/plugin/models.py +++ b/InvenTree/plugin/models.py @@ -40,3 +40,9 @@ class PluginConfig(models.Model): verbose_name=_('Active'), help_text=_('Is the plugin active'), ) + + def __str__(self) -> str: + name = f'{self.name} - {self.key}' + if not self.active: + name += '(not active)' + return name