mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
filter out base by default
This commit is contained in:
parent
6f8909c710
commit
7130bacf95
@ -34,9 +34,13 @@ class MixinBase:
|
||||
}
|
||||
|
||||
@property
|
||||
def registered_mixins(self):
|
||||
def registered_mixins(self, with_base: bool=False):
|
||||
mxins = getattr(self, '_mixinreg', None)
|
||||
if mxins:
|
||||
# filter out base
|
||||
if not with_base and 'base' in mxins:
|
||||
del mxins['base']
|
||||
# only return dict
|
||||
mxins = [a for a in mxins.values()]
|
||||
return mxins
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user