mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: display requests for TUs which no longer have an associated User
Closes #387 Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
6435c2b1f1
commit
7fed5742b8
1 changed files with 3 additions and 3 deletions
|
@ -7,7 +7,7 @@ from sqlalchemy import case
|
||||||
from aurweb import db, defaults, time, util
|
from aurweb import db, defaults, time, util
|
||||||
from aurweb.auth import creds, requires_auth
|
from aurweb.auth import creds, requires_auth
|
||||||
from aurweb.exceptions import handle_form_exceptions
|
from aurweb.exceptions import handle_form_exceptions
|
||||||
from aurweb.models import PackageRequest, User
|
from aurweb.models import PackageRequest
|
||||||
from aurweb.models.package_request import PENDING_ID, REJECTED_ID
|
from aurweb.models.package_request import PENDING_ID, REJECTED_ID
|
||||||
from aurweb.requests.util import get_pkgreq_by_id
|
from aurweb.requests.util import get_pkgreq_by_id
|
||||||
from aurweb.scripts import notify
|
from aurweb.scripts import notify
|
||||||
|
@ -31,8 +31,8 @@ async def requests(
|
||||||
context["O"] = O
|
context["O"] = O
|
||||||
context["PP"] = PP
|
context["PP"] = PP
|
||||||
|
|
||||||
# A PackageRequest query, with left inner joined User and RequestType.
|
# A PackageRequest query
|
||||||
query = db.query(PackageRequest).join(User, User.ID == PackageRequest.UsersID)
|
query = db.query(PackageRequest)
|
||||||
|
|
||||||
# If the request user is not elevated (TU or Dev), then
|
# If the request user is not elevated (TU or Dev), then
|
||||||
# filter PackageRequests which are owned by the request user.
|
# filter PackageRequests which are owned by the request user.
|
||||||
|
|
Loading…
Add table
Reference in a new issue