app/soc/logic/models/notification.py
changeset 1517 a467d13e34ea
parent 1308 35b75ffcbb37
child 1556 c81109a8a1a1
equal deleted inserted replaced
1516:8df06dc877aa 1517:a467d13e34ea
    58       # there is only one unread notification so send out an email
    58       # there is only one unread notification so send out an email
    59       notifications.sendNewNotificationMessage(entity)
    59       notifications.sendNewNotificationMessage(entity)
    60 
    60 
    61     super(Logic, self)._onCreate(entity)
    61     super(Logic, self)._onCreate(entity)
    62 
    62 
    63   def _updateField(self, entity, name, value):
    63   def _updateField(self, entity, entity_properties, name):
    64     """If unread changes we flush the sidebar cache.
    64     """If unread changes we flush the sidebar cache.
    65     """
    65     """
       
    66 
       
    67     value = entity_properties[name]
    66 
    68 
    67     if (name == 'unread') and (entity.unread != value):
    69     if (name == 'unread') and (entity.unread != value):
    68       # in case that the unread value changes we flush the sidebar.
    70       # in case that the unread value changes we flush the sidebar.
    69       sidebar.flush(entity.scope.account)
    71       sidebar.flush(entity.scope.account)
    70 
    72