modlog: fix 500 when clicking on an action and then clicking on an admin, if that admin doesn't have any admin actions of that specific type

This commit is contained in:
justcool393 2022-10-29 17:43:20 -05:00 committed by Ben Rog-Wilhelm
parent 0d4662588e
commit 7ff138f6f1

View file

@ -244,6 +244,7 @@ def log(v=None):
if admin_id:
actions = actions.filter_by(user_id=admin_id)
kinds = set([x.kind for x in actions])
kinds.add(kind)
types2 = {}
for k,val in types.items():
if k in kinds: types2[k] = val