diff --git a/InvenTree/plugin/base/integration/ScheduleMixin.py b/InvenTree/plugin/base/integration/ScheduleMixin.py index 201f0ea5cdb2..6a60197d7530 100644 --- a/InvenTree/plugin/base/integration/ScheduleMixin.py +++ b/InvenTree/plugin/base/integration/ScheduleMixin.py @@ -112,7 +112,7 @@ def get_scheduled_tasks(self): @property def has_scheduled_tasks(self): """Are tasks defined for this plugin.""" - return bool(self.scheduled_tasks) + return bool(self.get_scheduled_tasks()) def validate_scheduled_tasks(self): """Check that the provided scheduled tasks are valid.""" diff --git a/InvenTree/plugin/plugin.py b/InvenTree/plugin/plugin.py index 5b70ac49e1ee..6cafd510c0c1 100644 --- a/InvenTree/plugin/plugin.py +++ b/InvenTree/plugin/plugin.py @@ -138,7 +138,13 @@ def mixin_enabled(self, key): if fnc_name is True: return True - return getattr(self, fnc_name, True) + attr = getattr(self, fnc_name, True) + + if callable(attr): + return attr() + else: + return attr + return False def add_mixin(self, key: str, fnc_enabled=True, cls=None):