dont fail if part is an int

This commit is contained in:
j 2013-06-21 14:19:25 +02:00
parent 54f33394ed
commit 23c48d8290

View file

@ -161,6 +161,8 @@ class File(models.Model):
for type in ox.movie.EXTENSIONS:
if data['extension'] in ox.movie.EXTENSIONS[type]:
data['type'] = type
if 'part' in data and isinstance(data['part'], int):
data['part'] = str(data['part'])
return data
def normalize_path(self):