mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix(FastAPI): access AccountType ID directly
Signed-off-by: Steven Guikal <void@fluix.one>
This commit is contained in:
parent
a6ac5f0dbf
commit
ecbab8546b
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue