[extensions-web] views: Fix updating of extesions



commit 4dc11ff05ca47c6bafe8b77b2829823da705d2b1
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Jul 31 09:27:33 2013 -0400

    views: Fix updating of extesions

 sweettooth/extensions/models.py |    2 +-
 sweettooth/extensions/search.py |    4 ++--
 sweettooth/extensions/views.py  |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/sweettooth/extensions/models.py b/sweettooth/extensions/models.py
index b7352ff..df0387a 100644
--- a/sweettooth/extensions/models.py
+++ b/sweettooth/extensions/models.py
@@ -393,4 +393,4 @@ class ExtensionVersion(models.Model):
 
 submitted_for_review = Signal(providing_args=["request", "version"])
 reviewed = Signal(providing_args=["request", "version", "review"])
-extension_updated = Signal()
+extension_updated = Signal(providing_args=["extension"])
diff --git a/sweettooth/extensions/search.py b/sweettooth/extensions/search.py
index 07edd4c..7e05fed 100644
--- a/sweettooth/extensions/search.py
+++ b/sweettooth/extensions/search.py
@@ -42,8 +42,8 @@ def reviewed_handler(sender, request, version, review, **kwargs):
     index_extension(version.extension)
 reviewed.connect(reviewed_handler)
 
-def extension_updated_handler(instance, **kwargs):
-    index_extension(instance)
+def extension_updated_handler(extension, **kwargs):
+    index_extension(extension)
 extension_updated.connect(extension_updated_handler)
 
 def post_extension_delete_handler(instance, **kwargs):
diff --git a/sweettooth/extensions/views.py b/sweettooth/extensions/views.py
index e7dbb77..39b8d31 100644
--- a/sweettooth/extensions/views.py
+++ b/sweettooth/extensions/views.py
@@ -289,7 +289,7 @@ def ajax_inline_edit_view(request, extension):
     else:
         return HttpResponseForbidden()
 
-    models.extension_updated.send(sender=extension)
+    models.extension_updated.send(sender=extension, extension=extension)
 
     extension.save()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]