예제 #1
0
def migrateConferences(catalog):
    print "Migrating Conferences...",
    ch=ConferenceHolder()
    count=0
    for conf in catalog.dump():
        ch._getIdx()[conf.getId()]=conf
        count+=1
    print "[Done:%s]"%count
예제 #2
0
def migrateConferences(catalog):
    print "Migrating Conferences...",
    ch = ConferenceHolder()
    count = 0
    for conf in catalog.dump():
        ch._getIdx()[conf.getId()] = conf
        count += 1
    print "[Done:%s]" % count
예제 #3
0
파일: rb_room.py 프로젝트: vstitches/indico
    def getOwner( self ):
        """
        FINAL (not intented to be overriden)
        Owner in terms of "parent", i.e. conference
        """
        ####---FIXING THE USE OF IMPERSISTANT CLASS-----
        if isinstance(self.__owner, Impersistant):
            o = self.__owner.getObject()
            if o:
                self.__owner=o.getId()
            else:
                self.__owner=None
        ####---ENDO OF FIXING THE USE OF IMPERSISTANT CLASS-----
        ch = ConferenceHolder()
        if self.__owner and self.__owner in ch._getIdx():
            return ch.getById(self.__owner)

        return None
예제 #4
0
    def getOwner(self):
        """
        FINAL (not intented to be overriden)
        Owner in terms of "parent", i.e. conference
        """
        ####---FIXING THE USE OF IMPERSISTANT CLASS-----
        if isinstance(self.__owner, Impersistant):
            o = self.__owner.getObject()
            if o:
                self.__owner = o.getId()
            else:
                self.__owner = None
        ####---ENDO OF FIXING THE USE OF IMPERSISTANT CLASS-----
        ch = ConferenceHolder()
        if self.__owner and self.__owner in ch._getIdx():
            return ch.getById(self.__owner)

        return None