only videos have resolution

This commit is contained in:
j 2012-09-14 00:15:08 +02:00
parent 1bbfa6e0c8
commit 45d7bb3ea3
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ class File(models.Model):
def json(self, keys=None, user=None):
resolution = (self.width, self.height)
if resolution == (0, 0):
if resolution == (0, 0) or self.type != 'video':
resolution = None
duration = self.duration
if self.type != 'video':