From ecbab8546b68574c939b269dac1ac2d77e53766b Mon Sep 17 00:00:00 2001 From: Steven Guikal Date: Thu, 21 Oct 2021 17:48:29 -0400 Subject: [PATCH] fix(FastAPI): access AccountType ID directly Signed-off-by: Steven Guikal --- aurweb/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aurweb/auth.py b/aurweb/auth.py index 4d6dafc6..1527f0a3 100644 --- a/aurweb/auth.py +++ b/aurweb/auth.py @@ -244,7 +244,7 @@ def account_type_required(one_of: set): def decorator(func): @functools.wraps(func) async def wrapper(request: fastapi.Request, *args, **kwargs): - if request.user.AccountType.ID not in one_of: + if request.user.AccountTypeID not in one_of: return RedirectResponse("/", status_code=int(HTTPStatus.SEE_OTHER)) return await func(request, *args, **kwargs)