fix(aurora): fixed a programmingError when using all
Some checks failed
Actions / Build Documentation (MkDocs) (pull_request) Successful in 27s
Actions / Lint Code (Ruff & Pylint) (pull_request) Failing after 40s

This commit is contained in:
Seaswimmer 2024-08-13 16:26:14 -04:00
parent 1a20ae30de
commit f5aa9f2b20
Signed by: cswimr
GPG key ID: 3813315477F26F82

View file

@ -318,9 +318,11 @@ class Moderation(AuroraGuildModel):
conditions = []
if types:
if 'all' in types:
types = type_registry.keys()
conditions.append(f"moderation_type IN ({', '.join(['?' for _ in types])})")
for t in types:
params.append(t.key)
params.append(t)
if before:
conditions.append("timestamp < ?")
params.append(int(before.timestamp()))