Changeset 1497 for trunk/LeMillTool.py


Ignore:
Timestamp:
03/13/07 17:32:24 (13 years ago)
Author:
jukka
Message:

Worked on #1263, fixed permanently deleting deleted objects if someone wants to use their title/id. It had a bug and it didn't work as it should have been.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LeMillTool.py

    r1480 r1497  
    7474        if matches: 
    7575            for match in matches: 
    76                 if match.portal_type=='Redirector' or match.review_state=='Deleted': 
    77                     delete_list.append(match) 
     76                if match.portal_type=='Redirector' or match.review_state=='deleted': 
     77                    if match.UID not in [d.UID for d in delete_list]: 
     78                        delete_list.append(match) 
    7879                elif match.UID==obj.UID(): 
    7980                    pass 
     
    8687        if matches: 
    8788            for match in matches: 
    88                 if match.portal_type=='Redirector' or match.review_state=='Deleted': 
    89                     delete_list.append(match) 
     89                if match.portal_type=='Redirector' or match.review_state=='deleted': 
     90                    if match.UID not in [d.UID for d in delete_list]: 
     91                        delete_list.append(match) 
    9092                elif match.UID==obj.UID(): 
    9193                    pass 
     
    99101            o=o.getObject() 
    100102            context=o.aq_parent 
    101             context.manage_delObject([delid]) 
     103            context.manage_delObjects([delid]) 
    102104            #print 'deleted redirector/deleted %s in %s' % (delid,context)   
    103105        return True          
Note: See TracChangeset for help on using the changeset viewer.