app/soc/logic/models/role.py
changeset 1001 2faa7f80e8b2
parent 991 becede26c37f
child 1085 0afbdd0905ef
--- a/app/soc/logic/models/role.py	Mon Jan 26 16:04:19 2009 +0000
+++ b/app/soc/logic/models/role.py	Mon Jan 26 16:11:50 2009 +0000
@@ -73,6 +73,13 @@
       sidebar.flush(entity.user.account)
 
     return True
+  
+  def _onCreate(self, entity):
+    """Flush the sidebar cache when a new active role entity has been created.
+    """
+
+    if entity.state == 'active':
+      sidebar.flush(entity.user.account)
 
 
 logic = Logic()