]> git.parisson.com Git - teleforma.git/commitdiff
set mime types at imports
authoryomguy <yomguy@parisson.com>
Sun, 22 Jul 2012 22:37:25 +0000 (00:37 +0200)
committeryomguy <yomguy@parisson.com>
Sun, 22 Jul 2012 22:37:25 +0000 (00:37 +0200)
teleforma/management/commands/teleforma-import-conferences.py

index 5ab374d0917c818776182b5c8b89338e6bd8ec35..5cb6c6a2d908f32e9bec48f76cb5e76b08f0fc30 100644 (file)
@@ -73,7 +73,6 @@ class Command(BaseCommand):
                     department, c = Department.objects.get_or_create(name=department_name,
                                                                      organization=organization)
                     if Conference.objects.filter(public_id=public_id):
-                        print path
                         conference = Conference.objects.get(public_id=public_id)
                         conference.course = Course.objects.get(code=course_id)
                         conference.course_type = CourseType.objects.get(name=course_type)
@@ -133,6 +132,7 @@ class Command(BaseCommand):
                             media.course = conference.course
                             media.course_type = conference.course_type
                             media.type = ext
+                            media.set_mime_type()
                             media.save()
                             logger.logger.info(path)
                             i += 1