mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Subreddit Rules: Handle cases where short_name is None
This commit is contained in:
@@ -815,6 +815,7 @@ class VSubredditRule(Validator):
|
||||
min_length=1,
|
||||
).run(short_name.strip())
|
||||
if not short_name:
|
||||
self.set_error(errors.SR_RULE_DOESNT_EXIST)
|
||||
return None
|
||||
|
||||
rule = SubredditRules.get_rule(c.site, short_name)
|
||||
|
||||
Reference in New Issue
Block a user