'Given a db cursor, unlink the team associated with this package
(it\'s a bug if called with no team linked).'

def unlink_team(self, cursor):

    team = self.load_team(cursor)
    assert (team is not None)
    cursor.run(u'DELETE    FROM    teams_to_packages    WHERE    package_id=%s', (self.id,))
    self.app.add_event(cursor, u'package', dict(id=self.id, action=u'unlink', values=dict(team_id=team.id)))
