Changeset 6011


Ignore:
Timestamp:
16/11/09 09:40:52 (10 years ago)
Author:
aharwood
Message:

Fixed bug in addOnlineReferences that prevented all references being deleted

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ndgCommon/trunk/ndg/common/src/models/Atom.py

    r5930 r6011  
    378378        ''' 
    379379        logging.debug("Adding online references") 
    380         if not links: 
    381             return 
    382          
     380        
    383381        if type(links) is not list: 
    384382            links = [links] 
     
    387385        newLinks = [] 
    388386        for link in self.relatedLinks: 
     387             
    389388            if link.isChildAtom(): 
    390389                newLinks.append(link) 
    391390         
    392         newLinks.extend(links) 
     391        if (links):      
     392           newLinks.extend(links) 
     393 
    393394        self.relatedLinks = newLinks 
    394395        logging.debug("Online references added") 
Note: See TracChangeset for help on using the changeset viewer.