fix clip index for newly added clips

This commit is contained in:
j 2015-10-04 11:04:46 +01:00
parent 5649892bbd
commit be1589569e

View file

@ -106,8 +106,9 @@ class Edit(models.Model):
c = self.add_clip(data) c = self.add_clip(data)
if c: if c:
ids.insert(index, c.id) ids.insert(index, c.id)
index += 1
added.append(c.json(user)) added.append(c.json(user))
added[-1]['index'] = index
index += 1
else: else:
return False return False
self.sort_clips(ids) self.sort_clips(ids)