[GMG-Devel] [PATCH 41/83] Correct method names in event listeners

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


From: Praveen Kumar <praveen97uma at gmail.com>

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

diff --git a/mediagoblin/plugins/search/listeners.py b/mediagoblin/plugins/search/listeners.py
index 1b7a066..8064102 100644
--- a/mediagoblin/plugins/search/listeners.py
+++ b/mediagoblin/plugins/search/listeners.py
@@ -40,17 +40,17 @@ class ORMEventsListener(object):
     def insert_event_handler(self, mapper, connection, target):
         index = self.index_registry.get_index_for_object(target)
         try:
-            index.add_document_from_model_obj(target)
+            index.add_document_from_obj(target)
         except Exception as e:
             _log.debug("Failed to add object to index: %s"%(e))
 
     def update_event_handler(self, mapper, connection, target):
         index = self.index_registry.get_index_for_object(target)
-        index.update_document_from_model_obj(target)
+        index.update_document_from_obj(target)
 
     def delete_event_handler(self, mapper, connection, target):
         index = self.index_registry.get_index_for_object(target)
-        index.delete_document_from_model_obj(target)
+        index.delete_document_from_obj(target)
     
     def activate_listeners(self):
         try:
-- 
1.8.5.3



More information about the devel mailing list