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
1 changed files with 2 additions and 0 deletions

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):