From be1589569ee5bdf236a2efefb355c4d15d6267a8 Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Sun, 4 Oct 2015 11:04:46 +0100 Subject: [PATCH] fix clip index for newly added clips --- pandora/edit/models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pandora/edit/models.py b/pandora/edit/models.py index 713ec7c2..7b65466f 100644 --- a/pandora/edit/models.py +++ b/pandora/edit/models.py @@ -106,8 +106,9 @@ class Edit(models.Model): c = self.add_clip(data) if c: ids.insert(index, c.id) - index += 1 added.append(c.json(user)) + added[-1]['index'] = index + index += 1 else: return False self.sort_clips(ids)