mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-26 23:39:11 -05:00
Only show moderators in the "banned_by" api attribute.
This commit is contained in:
committed by
Keith Mitchell
parent
8b08c8ef55
commit
ffef0ef9d7
@@ -190,7 +190,7 @@ class ThingJsonTemplate(JsonTemplate):
|
||||
return thing.reported
|
||||
ban_info = getattr(thing, "ban_info", {})
|
||||
if attr == "banned_by":
|
||||
return ban_info.get("banner")
|
||||
return ban_info.get("banner") if ban_info.get('moderator_banned') else True
|
||||
elif attr == "approved_by":
|
||||
return ban_info.get("unbanner")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user