Revert "Validate subreddit name when submitting a link"

This reverts commit 0a31396f8a7aea504518ee326feef3f31d297f30.
This commit is contained in:
Keith Mitchell
2012-04-25 09:12:41 -07:00
committed by Max Goodman
parent 3a5d967553
commit 70a7f311ee

View File

@@ -850,10 +850,6 @@ class VSubmitSR(Validator):
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 @@ class VUrl(VRequired):
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))