Fix missing to_dict and import in robots model
Also adds a test to catch this issue
This commit is contained in:
parent
b37885d1e9
commit
854155fe82
3 changed files with 15 additions and 5 deletions
|
@ -1,7 +1,8 @@
|
|||
from app import avatar
|
||||
from data import model
|
||||
from data.database import User, FederatedLogin, Team, Repository
|
||||
from endpoints.api.robot_models_interface import RobotInterface, Robot, RobotWithPermissions, Permission
|
||||
from data.database import User, FederatedLogin, Team as TeamTable, Repository
|
||||
from endpoints.api.robot_models_interface import (RobotInterface, Robot, RobotWithPermissions, Team,
|
||||
Permission)
|
||||
|
||||
|
||||
class RobotPreOCIModel(RobotInterface):
|
||||
|
@ -31,7 +32,7 @@ class RobotPreOCIModel(RobotInterface):
|
|||
})
|
||||
robots[robot_name] = Robot(robot_dict['name'], robot_dict['token'])
|
||||
if include_permissions:
|
||||
team_name = robot_tuple.get(Team.name)
|
||||
team_name = robot_tuple.get(TeamTable.name)
|
||||
repository_name = robot_tuple.get(Repository.name)
|
||||
|
||||
if team_name is not None:
|
||||
|
|
Reference in a new issue