From 339872b0948f0d69f76c4404357c132f555e5612 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Tue, 29 Jul 2014 12:12:43 +0200 Subject: [PATCH] Optimizing update_role_points on role changed --- taiga/users/models.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/taiga/users/models.py b/taiga/users/models.py index 593e2c25..a94425bf 100644 --- a/taiga/users/models.py +++ b/taiga/users/models.py @@ -165,6 +165,4 @@ def role_post_save(sender, instance, created, **kwargs): if created: return - unique_projects = set(map(lambda x: x.project, instance.memberships.all())) - for project in unique_projects: - project.update_role_points() + instance.project.update_role_points()