update cached values in clips

This commit is contained in:
j 2011-10-20 10:49:01 +02:00
parent 0b30580e58
commit 02bf2707a3

View file

@ -667,6 +667,8 @@ class Item(models.Model):
s.wordsperminute = None s.wordsperminute = None
s.popularity = self.accessed.aggregate(Sum('accessed'))['accessed__sum'] s.popularity = self.accessed.aggregate(Sum('accessed'))['accessed__sum']
s.save() s.save()
#update cached values in clips
self.clips.all().update(director=s.director, year=s.title)
def update_facets(self): def update_facets(self):
for key in self.facet_keys + ['title']: for key in self.facet_keys + ['title']: