only videos have resolution
This commit is contained in:
parent
1bbfa6e0c8
commit
45d7bb3ea3
1 changed files with 1 additions and 1 deletions
|
@ -247,7 +247,7 @@ class File(models.Model):
|
||||||
|
|
||||||
def json(self, keys=None, user=None):
|
def json(self, keys=None, user=None):
|
||||||
resolution = (self.width, self.height)
|
resolution = (self.width, self.height)
|
||||||
if resolution == (0, 0):
|
if resolution == (0, 0) or self.type != 'video':
|
||||||
resolution = None
|
resolution = None
|
||||||
duration = self.duration
|
duration = self.duration
|
||||||
if self.type != 'video':
|
if self.type != 'video':
|
||||||
|
|
Loading…
Reference in a new issue