Add Filters.has_global

This commit is contained in:
cloudwithax 2022-10-25 21:08:16 -04:00
parent 0ef5db476b
commit 0e9399af3f
1 changed files with 5 additions and 0 deletions

View File

@ -33,6 +33,11 @@ class Filters:
"""Property which checks if any applied filters were preloaded""" """Property which checks if any applied filters were preloaded"""
return any(f for f in self._filters if f.preload == True) return any(f for f in self._filters if f.preload == True)
@property
def has_global(self):
"""Property which checks if any applied filters are global"""
return any(f for f in self._filters if f.preload == False)
@property @property
def empty(self): def empty(self):
"""Property which checks if the filter list is empty""" """Property which checks if the filter list is empty"""