mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-28 11:36:44 +00:00
- Closes https://github.com/inventree/InvenTree/issues/6793 (cherry picked from commit 9576b50152caada788af417405251331a3df2afe) Co-authored-by: Oliver <oliver.henry.walters@gmail.com>
This commit is contained in:
parent
ac83318081
commit
35fc954ff8
@ -112,7 +112,7 @@ class ScheduleMixin:
|
||||
@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."""
|
||||
|
@ -138,7 +138,13 @@ class MixinBase:
|
||||
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):
|
||||
|
Loading…
x
Reference in New Issue
Block a user