]> git.parisson.com Git - teleforma.git/commitdiff
fix no media public_id
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 10 Jul 2023 10:14:06 +0000 (12:14 +0200)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Mon, 10 Jul 2023 10:14:06 +0000 (12:14 +0200)
teleforma/models/core.py

index 2f9da4e2175b64c9a26e22adceb70091a401167c..47442efc464c0ef6f72e74d73b793de25ef2410b 100755 (executable)
@@ -560,8 +560,10 @@ class MediaTranscoded(Model):
     def __str__(self):
         if self.item.title:
             return self.item.title + ' - ' + self.mime_type
-        else:
+        elif self.item.public_id:
             return self.item.public_id + ' - ' + self.mime_type
+        else:
+            return "no public id nor media title"
 
     class Meta(MetaCore):
         db_table = app_label + '_media_transcoded'