def to_team(team):
        """Serializes team to id string
        :param team: object to serialize
        :return: string id
        """
        from sevenbridges.models.team import Team
        if not team:
            raise SbgError('Team is required!')
        elif isinstance(team, Team):
            return team.id
        elif isinstance(team, six.string_types):
            return team
        else:
            raise SbgError('Invalid team parameter!')