def _get_parent_location(self, obj, attr):
        type_ = obj.__class__.__name__
        if type_ == 'SessionSlot':
            conf = obj.session.conference
            return getattr(conf, attr)[0] if getattr(conf, attr, None) else None
        elif type_ in ('BreakTimeSchEntry', 'Contribution', 'AcceptedContribution'):
            if type_ == 'AcceptedContribution':
                contrib_parent = obj._session
                if getattr(contrib_parent, attr, None):
                    return getattr(contrib_parent, attr)[0]
                else:
                    owner = contrib_parent.conference
            elif type_ == 'Contribution':
                contrib_parent = obj.parent
                if attr == 'places' and contrib_parent:
                    places = getattr(contrib_parent, attr, None)
                    return getattr(contrib_parent, 'place', None) if not places else places[0]
                if attr == 'rooms' and contrib_parent:
                    rooms = getattr(contrib_parent, attr, None)
                    return getattr(contrib_parent, 'room', None) if not rooms else rooms[0]
            elif type_ == 'BreakTimeSchEntry':
                owner = obj._sch._owner
            return self._get_parent_location(owner, attr)
        elif type_ == 'Conference':
            return getattr(obj, attr)[0] if getattr(obj, attr, None) else None
        elif type_ == 'Session':
            return self._get_parent_location(obj.conference, attr)