Only show moderators in the "banned_by" api attribute.

This commit is contained in:
Max Goodman
2012-03-14 15:40:00 -07:00
committed by Keith Mitchell
parent 8b08c8ef55
commit ffef0ef9d7

View File

@@ -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")