From d0c59e05c26b139e41f78271dc02f255e37b18ba Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 26 Mar 2013 10:33:47 +0000 Subject: [PATCH] also migrate uploaded srt files --- pandora/archive/migrations/0005_data_folders.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pandora/archive/migrations/0005_data_folders.py b/pandora/archive/migrations/0005_data_folders.py index 9da4f46ae..408872737 100644 --- a/pandora/archive/migrations/0005_data_folders.py +++ b/pandora/archive/migrations/0005_data_folders.py @@ -12,6 +12,9 @@ class Migration(DataMigration): for s in orm['archive.Stream'].objects.all(): s.video.name = s.video.name.replace('files/', 'media/') s.save() + for f in orm['archive.File'].objects.exclude(data=''): + f.data.name = f.data.name.replace('files/', 'media/') + f.save() def backwards(self, orm): "Write your backwards methods here."