forked from 0x2620/pandora
set words/clips only if id exists
This commit is contained in:
parent
f0acbd2bef
commit
dd49b61a59
1 changed files with 3 additions and 2 deletions
|
@ -811,6 +811,7 @@ class Item(models.Model):
|
||||||
s.rightslevel = self.level
|
s.rightslevel = self.level
|
||||||
|
|
||||||
s.aspectratio = self.get('aspectratio')
|
s.aspectratio = self.get('aspectratio')
|
||||||
|
if self.id:
|
||||||
s.words = sum([len(a.value.split()) for a in self.annotations.exclude(value='')])
|
s.words = sum([len(a.value.split()) for a in self.annotations.exclude(value='')])
|
||||||
s.clips = self.clips.count()
|
s.clips = self.clips.count()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue