This commit is contained in:
j 2016-06-15 17:56:31 +02:00
parent 3c1f4a8c95
commit b2a9a5f711
2 changed files with 2 additions and 2 deletions

View file

@ -257,7 +257,7 @@ class File(models.Model):
self.duration = None
else:
duration = sum([s.info.get('duration', 0)
for s in self.streams.filter(source=None)])
for s in self.streams.filter(source=None)])
if duration:
self.duration = duration

View file

@ -20,7 +20,7 @@ def update_statistics():
stats = Statistics()
ids = [i['session_key']
for i in models.SessionData.objects.filter(level__gte=0).values('session_key')]
for i in models.SessionData.objects.filter(level__gte=0).values('session_key')]
for chunk in chunker(ids, 100, None):
chunk = filter(None, chunk)