Flush the sidebar cache when a new active role entity has been created.
Patch by: Lennard de Rijk
Reviewed by: to-be-reviewed
--- 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()