Changeset 1996


Ignore:
Timestamp:
09/12/07 16:27:32 (12 years ago)
Author:
pjotr
Message:

Fixes #1519, bad collections should not be visile on the front page any more

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Collection.py

    r1972 r1996  
    271271        """ Check if there is content,method,tool and description """         
    272272        desc=self.Description() 
     273        #import pdb;pdb.set_trace() 
     274        good_content = False 
     275        good_methods = False 
     276        good_tools = False 
    273277        c=self.getRelatedContent() 
     278        for obj in c: 
     279            if obj.getHasCoverImage(): 
     280                good_content = True 
    274281        m=self.getRelatedMethods() 
     282        for obj in m: 
     283            if obj.getHasCoverImage(): 
     284                good_methods = True 
    275285        t=self.getRelatedTools() 
     286        for obj in t: 
     287            if obj.getHasCoverImage(): 
     288                good_tools = True 
    276289        wtool=getToolByName(self, 'portal_workflow') 
    277290        r= wtool.getInfoFor(self,'review_state',None)!='deleted' 
    278         if desc and c and m and t and r: 
     291        if desc and good_content and good_methods and good_tools and r: 
    279292            return True 
    280293        else: 
Note: See TracChangeset for help on using the changeset viewer.