def filter_business(self, query, appstruct): remember_navigation_history(self.request, self.context.id) self.populate_navigation() query = query.filter(Task.business_id == self.context.id) return query