# HG changeset patch # User Lennard de Rijk # Date 1232986310 0 # Node ID 2faa7f80e8b2212f709470bef26bdcd7068afd85 # Parent 9af147fc1f1cb3dbfb33c1aec2e59db2190e9593 Flush the sidebar cache when a new active role entity has been created. Patch by: Lennard de Rijk Reviewed by: to-be-reviewed diff -r 9af147fc1f1c -r 2faa7f80e8b2 app/soc/logic/models/role.py --- 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()