fix misnamed key in permissions api

This commit is contained in:
Evan Cordell 2017-08-09 08:37:59 -04:00
parent 646fafb2fd
commit cac0457540

View file

@ -34,8 +34,8 @@ class UserPermission(namedtuple('UserPermission', [
def to_dict(self):
perm_dict = {
'role': self.role_name,
'username': self.username,
'is_robot': False,
'name': self.username,
'is_robot': self.is_robot,
'avatar': self.avatar,
}
if self.has_org:
@ -53,7 +53,7 @@ class RobotPermission(namedtuple('RobotPermission', [
def to_dict(self, user=None, team=None, org_members=None):
return {
'role': self.role_name,
'username': self.username,
'name': self.username,
'is_robot': True,
'is_org_member': self.is_org_member,
}