def find_by_name(self, term: str, include_placeholders: bool = False) -> List[Account]:
        """ Search for account by part of the name """
        query = (
            self.query
            .filter(Account.name.like('%' + term + '%'))
            .order_by(Account.name)
        )
        # Exclude placeholder accounts?
        if not include_placeholders:
            query = query.filter(Account.placeholder == 0)

        # print(generic.get_sql(query))
        return query.all()
def find_by_name ( self , term : str , include_placeholders : bool = False ) -> List [ Account ] : query = ( self . query . filter ( Account . name . like ( '%' + term + '%' ) ) . order_by ( Account . name ) ) if not include_placeholders : query = query . filter ( Account . placeholder == 0 ) return query . all ( )
Search for account by part of the name