def list_accounts(self, with_state=None, include_service=False): accounts = list( filter( lambda x: (include_service or (x['type'] != AccountTypes.service)), db_accounts.get_all(with_state=with_state, session=self.session))) return accounts
def list_accounts(self, include_service=False): accounts = filter(lambda x: not include_service or (x['type'] != AccountTypes.service), db_accounts.get_all(session=self.session)) return accounts