Permalink
Browse files

Revert "Validate subreddit name when submitting a link"

This reverts commit 0a31396.
  • Loading branch information...
1 parent 3a5d967 commit 70a7f311ee2c3c02bbd237e8b69e03d84c74f15c @kemitche kemitche committed with chromakode Apr 25, 2012
Showing with 0 additions and 7 deletions.
  1. +0 −7 r2/r2/controllers/validator/validator.py
@@ -850,10 +850,6 @@ def run(self, sr_name, link_type = None):
self.set_error(errors.SUBREDDIT_REQUIRED)
return None
- if not chksrname(sr_name):
- self.set_error(errors.SUBREDDIT_NOEXIST)
- return None
-
try:
sr = Subreddit._by_name(str(sr_name).strip())
except (NotFound, AttributeError, UnicodeEncodeError):
@@ -990,9 +986,6 @@ def __init__(self, item, allow_self = True, lookup = True, *a, **kw):
def run(self, url, sr = None, resubmit=False):
if sr is None and not isinstance(c.site, FakeSubreddit):
sr = c.site
- elif not chksrname(sr):
- self.set_error(errors.SUBREDDIT_NOEXIST)
- sr = None
elif sr:
try:
sr = Subreddit._by_name(str(sr))

0 comments on commit 70a7f31

Please sign in to comment.