]> git.parisson.com Git - teleforma.git/commitdiff
add condition
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 10 Nov 2023 21:17:44 +0000 (22:17 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Fri, 10 Nov 2023 21:17:44 +0000 (22:17 +0100)
teleforma/management/commands/teleforma-import-conferences-2-fix-poster.py

index 79be38f9b6ab34b853789ca384cf9c73bcaa351d..cd5e82bf42994b06e8121563445f5b63fe1153fb 100644 (file)
@@ -75,7 +75,7 @@ class Command(BaseCommand):
                                 # POSTER
                                 for file in files:
                                     filename, extension = os.path.splitext(file)
-                                    if extension[1:] in self.image_formats:
+                                    if extension[1:] in self.image_formats and not media.poster_file:
                                         media.poster_file = dir + os.sep + file
                                         logger.logger.info(media.poster_file)
                                         break