fix: depend on OutOfDateTS for flag state

It was found in the aur.al database that some records have
a non-null flagger, but are not flagged. Using the flagger
relationship, we were false redirecting away from the flag
page.

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-02-05 03:21:46 -08:00
parent a445a40bea
commit 7618101b1b
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
2 changed files with 4 additions and 4 deletions

View file

@ -804,7 +804,7 @@ def test_pkgbase_flag(client: TestClient, user: User, maintainer: User,
pkgbase = package.PackageBase
# We shouldn't have flagged the package yet; assert so.
assert pkgbase.Flagger is None
assert pkgbase.OutOfDateTS is None
cookies = {"AURSID": user.login(Request(), "testPassword")}
endpoint = f"/pkgbase/{pkgbase.Name}/flag"