app/soc/logic/models/document.py
changeset 2427 0dee663d6582
parent 1669 47c1048fc4ef
equal deleted inserted replaced
2426:7ad0570af9ba 2427:0dee663d6582
    66     """
    66     """
    67 
    67 
    68     return not entity.home_for
    68     return not entity.home_for
    69 
    69 
    70   def _updateField(self, entity, entity_properties, name):
    70   def _updateField(self, entity, entity_properties, name):
    71     """Special logic for role. If state changes to active we flush the sidebar.
    71     """Special logic for Document.
       
    72 
       
    73     - Flush the sidebar when a document is featured.
       
    74     - Remove the document from the homepage cache when the home_for is updated
    72     """
    75     """
    73 
    76 
    74     value = entity_properties[name]
    77     value = entity_properties[name]
    75 
    78 
    76     if (name == 'is_featured') and (entity.is_featured != value):
    79     if (name == 'is_featured') and (entity.is_featured != value):