[GMG-Devel] [PATCH 32/83] Add event listener for model update

Alon Levy alon at pobox.com
Tue Feb 25 14:58:15 EST 2014


From: Praveen Kumar <praveen97uma at gmail.com>

---
 mediagoblin/plugins/search/listeners.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mediagoblin/plugins/search/listeners.py b/mediagoblin/plugins/search/listeners.py
index 7f6b4b3..8d6c192 100644
--- a/mediagoblin/plugins/search/listeners.py
+++ b/mediagoblin/plugins/search/listeners.py
@@ -33,7 +33,8 @@ class ORMEventsListener(object):
         index.add_document_from_model_obj(target)
     
     def update_event_handler(self, mapper, connection, target):
-        pass
+        index = self.index_registry.get_index_for_object(target)
+        index.update_document_from_model_obj(target)
 
     def delete_event_handler(self, mapper, connection, target):
         pass
-- 
1.8.5.3



More information about the devel mailing list