app/soc/logic/models/document.py
changeset 1095 0122dc66e5d2
parent 1019 0cd056f2c739
child 1106 e14b0995cf29
equal deleted inserted replaced
1094:e143974a6e27 1095:0122dc66e5d2
    40     """
    40     """
    41 
    41 
    42     super(Logic, self).__init__(model=model, base_model=base_model,
    42     super(Logic, self).__init__(model=model, base_model=base_model,
    43                                 scope_logic=scope_logic)
    43                                 scope_logic=scope_logic)
    44 
    44 
       
    45   def getKeyValues(self, entity):
       
    46     """See base.Logic.getKeyNameValues.
       
    47     """
       
    48 
       
    49     return [entity.prefix, entity.scope_path, entity.link_id]
       
    50 
       
    51   def getKeyValuesFromFields(self, fields):
       
    52     """See base.Logic.getKeyValuesFromFields.
       
    53     """
       
    54 
       
    55     return [fields['prefix'], fields['scope_path'], fields['link_id']]
       
    56 
       
    57   def getKeyFieldNames(self):
       
    58     """See base.Logic.getKeyFieldNames.
       
    59     """
       
    60 
       
    61     return ['prefix', 'scope_path', 'link_id']
       
    62 
    45   def _updateField(self, entity, name, value):
    63   def _updateField(self, entity, name, value):
    46     """Special logic for role. If state changes to active we flush the sidebar.
    64     """Special logic for role. If state changes to active we flush the sidebar.
    47     """
    65     """
    48 
    66 
    49     if (name == 'is_featured') and (entity.is_featured != value):
    67     if (name == 'is_featured') and (entity.is_featured != value):