]> git.parisson.com Git - teleforma.git/commitdiff
compute duration
authorGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 8 Jul 2026 21:29:36 +0000 (23:29 +0200)
committerGuillaume Pellerin <guillaume.pellerin@parisson.com>
Wed, 8 Jul 2026 21:29:36 +0000 (23:29 +0200)
teleforma/models/core.py

index cb296faaed96aa4f976d27500999b8371b3ea61a..3d6447f6a34d13c4123416250b43e4fe58adf763 100644 (file)
@@ -1104,6 +1104,8 @@ class Media(MediaBase):
         super(Media, self).save(**kwargs)
         if self.course:
             self.course.save()
+        if not self.duration:
+            self.set_duration()
 
     def poster_url(self, geometry='640'):
         url = ''