fix(endpoints/api/robot.py): fix missnamed attribute

Issue:NA

- [ ] It works!
- [ ] Comments provide sufficient explanations for the next contributor
- [ ] Tests cover changes and corner cases
- [ ] Follows Quay syntax patterns and format
This commit is contained in:
Charlton Austin 2017-08-01 13:47:48 -04:00
parent 044036ff4d
commit 36e58e3bd0
2 changed files with 4 additions and 4 deletions

View file

@ -29,8 +29,6 @@ class RobotPreOCIModel(RobotInterface):
'teams': [],
'repositories': []
})
robots[robot_name] = RobotWithPermissions(robot_dict['name'], robot_dict['token'], robot_dict['teams'],
robot_dict['repositories'])
robots[robot_name] = Robot(robot_dict['name'], robot_dict['token'])
if include_permissions:
team_name = robot_tuple.get(Team.name)
@ -49,6 +47,8 @@ class RobotPreOCIModel(RobotInterface):
if repository_name is not None:
if repository_name not in robot_dict['repositories']:
robot_dict['repositories'].append(repository_name)
robots[robot_name] = RobotWithPermissions(robot_dict['name'], robot_dict['token'], robot_dict['teams'],
robot_dict['repositories'])
return robots.values()