示例#1
0
文件: testing.py 项目: somair/halo
def get_users_account(account=None, profile=None):
    for acct in Account.select():
        if not _check(acct.profile, profile):
            continue
        if not _check(acct, account):
            continue
        break
    else:
        raise ValueError('Account not found')

    return UserAccount.from_account(acct.id)