示例#1
0
 def after_update(self, context, data_dict):
     # FIXME: flash_success makes no sense if this was an API call
     # consider moving this to an overridden controller method instead
     if context.get('allow_state_change') and data_dict.get(
             'state') == 'active':
         h.flash_success(
             _("Your record %s has been saved.") % data_dict['id'])
     search_integration.add_to_search_index(data_dict['id'], in_bulk=False)
     return data_dict
示例#2
0
 def after_create(self, context, data_dict):
     search_integration.add_to_search_index(data_dict['id'], in_bulk=False)
     return data_dict