]> git.parisson.com Git - teleforma.git/commitdiff
fix rank
authorGuillaume Pellerin <yomguy@parisson.com>
Mon, 30 Dec 2013 15:13:57 +0000 (16:13 +0100)
committerGuillaume Pellerin <yomguy@parisson.com>
Mon, 30 Dec 2013 15:13:57 +0000 (16:13 +0100)
teleforma/management/commands/teleforma-import-seminar-media.py

index 894f006ec288886eaa1852149aed6ec2eeba37b0..6190aa74192666fbbfa1d2ec164a588e6b360419 100644 (file)
@@ -108,10 +108,13 @@ class Command(BaseCommand):
                             and not 'preview' in filename and not 'Preview' in filename and filename[0] != '.':
 
                     print filename
+                    
                     # seminar_rank <= 9
                     seminar_rank = int(root_list[-1][0])
+
                     if len(root_list[-1]) != 1:
-                        media_rank = self.media_rank_dict[root_list[-1][1:].replace('_', '')]
+                        rank = root_list[-1][1:].copy()
+                        media_rank = self.media_rank_dict[rank.replace('_', '')]
                         preview_trigger = False
                     else:
                         media_rank = 1