Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Subreddit: simplify "contributor" attribute check.
Browse files Browse the repository at this point in the history
Don't worry about whether the subreddit is not public.
  • Loading branch information
bsimpson63 committed May 20, 2015
1 parent bc02074 commit 062718e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions r2/r2/models/subreddit.py
Expand Up @@ -863,9 +863,7 @@ def add_props(cls, user, wrapped):
for item in wrapped:
item.subscriber = item._id in subscriber_srids
item.moderator = item._id in moderator_srids
item.contributor = (item.type != 'public' and
(item.moderator or
item._id in contributor_srids))
item.contributor = item._id in contributor_srids

if item.hide_subscribers and not c.user_is_admin:
item._ups = 0
Expand Down

0 comments on commit 062718e

Please sign in to comment.