Notification logic in main SoC is capable of getting constructor parameters.
authorMadhusudan.C.S <madhusudancs@gmail.com>
Sun, 02 Aug 2009 15:20:00 +0530
changeset 2708 db544114b158
parent 2707 ffabb3576744
child 2709 7a595f688ab5
Notification logic in main SoC is capable of getting constructor parameters.
app/soc/logic/models/notification.py
--- a/app/soc/logic/models/notification.py	Sat Aug 01 16:22:10 2009 -0700
+++ b/app/soc/logic/models/notification.py	Sun Aug 02 15:20:00 2009 +0530
@@ -36,11 +36,12 @@
   """Logic methods for the Notification model.
   """
 
-  def __init__(self):
+  def __init__(self, model=soc.models.notification.Notification,
+               base_model=None, scope_logic=user_logic):
     """Defines the name, key_name and model for this entity.
     """
-    super(Logic, self).__init__(model=soc.models.notification.Notification,
-         base_model=None, scope_logic=user_logic)
+    super(Logic, self).__init__(model=model, base_model=base_model,
+                                scope_logic=scope_logic)
 
   def _onCreate(self, entity):
     """Sends out a message if there is only one unread notification.