From 67d9d9413f5e75111b409568e7b5b9ddf2fb951a Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 30 Dec 2021 22:58:11 +1100 Subject: [PATCH] Plugin code bug fix - handle case where self.plugin is None --- InvenTree/plugin/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/InvenTree/plugin/models.py b/InvenTree/plugin/models.py index b8178440af..811ed5b431 100644 --- a/InvenTree/plugin/models.py +++ b/InvenTree/plugin/models.py @@ -54,7 +54,11 @@ class PluginConfig(models.Model): # extra attributes from the registry def mixins(self): - return self.plugin._mixinreg + + if self.plugin: + return self.plugin._mixinreg + else: + return {} # functions