From 4ac6e818667e7d40a828ba1bf4d126b4ed3dd2d0 Mon Sep 17 00:00:00 2001 From: Matt Frazier Date: Fri, 7 Jul 2023 13:27:39 -0400 Subject: [PATCH] Avoid KeyError on spam force-remove --- osf/models/collection_submission.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osf/models/collection_submission.py b/osf/models/collection_submission.py index b06b186df8d..d342def9cbc 100644 --- a/osf/models/collection_submission.py +++ b/osf/models/collection_submission.py @@ -210,7 +210,7 @@ def _notify_moderated_rejected(self, event_data): ) def _validate_remove(self, event_data): - user = event_data.kwargs['user'] + user = event_data.kwargs.get('user') force = event_data.kwargs.get('force') if force: return