Skip to content

Commit

Permalink
Fix race condition on projects refresh totals
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino committed Jun 7, 2016
1 parent 935347a commit 3fd3322
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion taiga/projects/models.py
Expand Up @@ -339,7 +339,17 @@ def refresh_totals(self, save=True):
self.total_activity_last_year = qs_year.count()

if save:
self.save()
self.save(update_fields=[
'totals_updated_datetime',
'total_fans',
'total_fans_last_week',
'total_fans_last_month',
'total_fans_last_year',
'total_activity',
'total_activity_last_week',
'total_activity_last_month',
'total_activity_last_year',
])

@cached_property
def cached_user_stories(self):
Expand Down

0 comments on commit 3fd3322

Please sign in to comment.