random 1, update sort after import

This commit is contained in:
j 2012-02-22 17:58:42 +05:30
parent 9c5ba8614b
commit d34b2e4860
2 changed files with 2 additions and 1 deletions

View file

@ -119,6 +119,7 @@ def update_stream(id):
s.file.item.update_timeline()
#make sure all derivatives exist
s.extract_derivatives()
s.file.item.update_sort()
#update clips
for c in s.file.item.clips.all():

View file

@ -22,7 +22,7 @@ def update_random_sort():
random.seed()
ids = [f['item'] for f in models.ItemSort.objects.values('item')]
random.shuffle(ids)
n = 0
n = 1
for i in ids:
models.ItemSort.objects.filter(pk=i).update(random=n)
n += 1