Changeset 8263


Ignore:
Timestamp:
19/04/12 15:46:26 (7 years ago)
Author:
mnagni
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/MolesManager/trunk/src/libs/migration/processor/deployment.py

    r8259 r8263  
    302302        infodb_de = InfodbEPB.getCedaInfoApp_dataentityByDE_ID(dataentity_id) 
    303303        i_logical_path = '/dummy' 
    304         if infodb_de['logical_path']: 
     304        if infodb_de is None: 
     305            i_logical_path = dwn['href'][dwn['href'].index('/browse/') + 7:] 
     306         
     307        if infodb_de and infodb_de.has_key('logical_path'): 
    305308            i_logical_path = infodb_de['logical_path'] 
    306309         
    307310        i_category = ceda_curationvalue.CEDA_CurationValue.cl_a                             
    308         if infodb_de['category']: 
     311        if infodb_de and infodb_de.has_key('category'): 
    309312            i_category = CEDA_CurationValue.from_string(infodb_de['category'].lower()) #self._getcurationcategory(infodb_de['category'])                 
    310313        observation.result = createCEDA_Result(i_category, i_logical_path, source = [i_source])                                 
     
    328331 
    329332    def assignDOI(self, observation, doi): 
    330         if doi: 
     333        if doi and doi.has_key('href'): 
    331334            doi = doi['href'][4:]             
    332335            py_date = None 
Note: See TracChangeset for help on using the changeset viewer.