diff --git a/r2/r2/controllers/front.py b/r2/r2/controllers/front.py index 24c33a1a1..bea5c56da 100755 --- a/r2/r2/controllers/front.py +++ b/r2/r2/controllers/front.py @@ -405,7 +405,7 @@ class FrontController(RedditController): @prevent_framing_and_css(allow_cname_frame=True) @paginated_listing(max_page_size=500, backend='cassandra') - @validate(mod=VAccountByName('mod'), + @validate(mod=nop('mod'), action=VOneOf('type', ModAction.actions)) @api_doc(api_section.moderation) def GET_moderationlog(self, num, after, reverse, count, mod, action): @@ -413,6 +413,12 @@ class FrontController(RedditController): c.site.is_moderator(c.user)): return self.abort404() + if mod: + try: + mod = Account._by_name(mod, allow_deleted=True) + except NotFound: + mod = None + if isinstance(c.site, (MultiReddit, ModSR)): srs = Subreddit._byID(c.site.sr_ids, return_dict=False)