mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-02-08 21:55:02 -05:00
Fix error when reporting things not in a subreddit
This commit is contained in:
@@ -1081,9 +1081,10 @@ class ApiController(RedditController, OAuth2ResourceController):
|
||||
elif isinstance(thing, Comment):
|
||||
pass
|
||||
|
||||
sr = getattr(thing, 'subreddit_slow', None)
|
||||
if (c.user._spam or
|
||||
c.user.ignorereports or
|
||||
thing.subreddit_slow.is_banned(c.user)):
|
||||
(sr and sr.is_banned(c.user))):
|
||||
return
|
||||
Report.new(c.user, thing)
|
||||
admintools.report(thing)
|
||||
|
||||
Reference in New Issue
Block a user