]> git.parisson.com Git - telemeta.git/commitdiff
fix item path
authorGuillaume Pellerin <yomguy@parisson.com>
Thu, 7 May 2015 07:56:36 +0000 (09:56 +0200)
committerGuillaume Pellerin <yomguy@parisson.com>
Thu, 7 May 2015 07:56:36 +0000 (09:56 +0200)
telemeta/management/commands/telemeta-import-collections-from-crem.py

index 78e7e46386ed85659ccc460e767a8523b0a21c3a..ccd0e1b2aa7998a39e470b2a6b929596b20c762c 100644 (file)
@@ -93,7 +93,7 @@ class Command(BaseCommand):
                     f.close()
                 else:
                     print "file in MEDIA_ROOT, linking..."
-                    path = media[len(self.media_root)+1:]
+                    path = media[len(self.media_root):]
                     if not self.dry_run:
                         item.file = path
                         item.save()