'Close the team account.'

def close(self):

    with self.db.get_cursor() as cursor:
        cursor.run(u'UPDATE    teams    SET    is_closed=true    WHERE    id=%s', (self.id,))
        self.app.add_event(cursor, u'team', dict(id=self.id, action=u'set', values=dict(is_closed=True)))
        self.set_attributes(is_closed=True)
        if self.package:
            self.package.unlink_team(cursor)
