Skip to content

Commit

Permalink
Add Application.active_view_filters().
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinstadler committed Dec 3, 2021
1 parent e961723 commit 171cbc7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions vit/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ def set_active_context(self):
def active_context_filter(self):
return self.contexts[self.context]['filter'] if self.context and self.reports[self.report].get('context', 1) else []

def active_view_filters(self):
# precedence-preserving concatenation of context, report and extra filters
return self.model.build_task_filters(self.active_context_filter(), self.model.active_report_filter(), self.extra_filters)

def load_contexts(self):
self.contexts = self.task_config.get_contexts()

Expand Down

0 comments on commit 171cbc7

Please sign in to comment.