def add_accounts_to_institute(accounts_query, institute):
    """ Add accounts to institute. """

    query = accounts_query.filter(date_deleted__isnull=True)

    for account in query:
        add_account_to_institute(account, institute)
def add_accounts_to_institute ( accounts_query , institute ) : query = accounts_query . filter ( date_deleted__isnull = True ) for account in query : add_account_to_institute ( account , institute )
Add accounts to institute.