Changeset 8387 for mauRepo


Ignore:
Timestamp:
21/06/12 17:05:14 (7 years ago)
Author:
mnagni
Message:

CEDA_Observations were not correctly added to CEDA_ObservationCollection.member

Location:
mauRepo/MolesManager/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/MolesManager/moles3epb.py

    r8358 r8387  
    167167            @return: True if the collection contains the given observation, False otherwise   
    168168        """ 
    169         ret = self._session.query(CEDA_ObservationCollection, CEDA_Observation).filter(CEDA_ObservationCollection.id==obs_coll_id).filter(CEDA_Observation.id==obs_id).count() > 0 
    170         return ret 
     169        coll = self._session.query(CEDA_ObservationCollection).filter(CEDA_ObservationCollection.id==obs_coll_id).first() 
     170        obs = self._session.query(CEDA_Observation).filter(CEDA_Observation.id==obs_id).first() 
     171        return obs in coll.member 
    171172 
    172173    def observationAuthor(self, obs_id): 
  • mauRepo/MolesManager/trunk/src/libs/migration/tests/migrationprocess.py

    r8363 r8387  
    5252     
    5353    def setUp(self): 
    54         migrationDB = DbManager(MIGRATION_DB_CONNECTION, MIGRATION_DB_SCRIPT, sql_echo=True) 
    55         #migrationDB = DbManager(MIGRATION_DB_CONNECTION, MIGRATION_DB_SCRIPT) 
    56         #MigrationEPB.overrrideDBManager(migrationDB)       
     54        #migrationDB = DbManager(MIGRATION_DB_CONNECTION, MIGRATION_DB_SCRIPT, sql_echo=True) 
     55        migrationDB = DbManager(MIGRATION_DB_CONNECTION, MIGRATION_DB_SCRIPT)       
    5756 
    58         molesDB = DbManager(MOLES3_DB_CONNECTION, MOLES3_DB_SCRIPT, sql_echo=True, session_event_manager=EVENTS_DB) 
    59         #molesDB = DbManager(MOLES3_DB_CONNECTION, MOLES3_DB_SCRIPT, session_event_manager=EVENTS_DB)          
     57        #molesDB = DbManager(MOLES3_DB_CONNECTION, MOLES3_DB_SCRIPT, sql_echo=True, session_event_manager=EVENTS_DB) 
     58        molesDB = DbManager(MOLES3_DB_CONNECTION, MOLES3_DB_SCRIPT, session_event_manager=EVENTS_DB)          
    6059         
    6160         
     
    8887         
    8988        #Has 3 DOI 
    90         #self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_chobs.atom') 
     89        self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_chobs.atom') 
    9190         
    9291        #IASI 
    93         #self.processDataEntity(DO_NEODC, DS_pUBLISHED, 'dataent_12417810458627666.atom') 
    94         #self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_VIRTEM.atom') 
    95         #self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_12162569915925921.atom') 
     92        self.processDataEntity(DO_NEODC, DS_pUBLISHED, 'dataent_12417810458627666.atom') 
     93        self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_VIRTEM.atom') 
     94        self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_12162569915925921.atom') 
    9695               
    9796        #ECMWF 
    98         #self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_ECMWF-ERA.atom') 
    99         #self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_ECMWF-OP.atom') 
     97        self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_ECMWF-ERA.atom') 
     98        self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_ECMWF-OP.atom') 
    10099        self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_12458543158227759.atom')                 
    101100        self.processDataEntity(DO_BADC, DS_pUBLISHED, 'dataent_ECMWF-E40.atom') 
Note: See TracChangeset for help on using the changeset viewer.