times access should be 0 not None
This commit is contained in:
parent
ba2dd341d3
commit
f7ee92369b
1 changed files with 2 additions and 0 deletions
|
@ -714,6 +714,8 @@ class Item(models.Model):
|
|||
s.cutsperminute = None
|
||||
s.wordsperminute = None
|
||||
s.timesaccessed = self.accessed.aggregate(Sum('accessed'))['accessed__sum']
|
||||
if not s.timesaccessed:
|
||||
s.timesaccessed = 0
|
||||
s.save()
|
||||
#update cached values in clips
|
||||
self.clips.all().update(director=s.director, title=s.title)
|
||||
|
|
Loading…
Reference in a new issue