]> git.parisson.com Git - teleforma.git/commitdiff
Fix marker import : https://trackers.pilotsystems.net/prebarreau/0463
authorYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 16 Jun 2022 08:12:03 +0000 (10:12 +0200)
committerYoan Le Clanche <yoanl@pilotsystems.net>
Thu, 16 Jun 2022 08:12:03 +0000 (10:12 +0200)
teleforma/management/commands/teleforma-import-markers.py

index 6529c609dcfd390f65111e36adcee22c8a606c00..297ea64bfad5b554e5fc4825546197691c77a14b 100644 (file)
@@ -20,9 +20,12 @@ class Command(BaseCommand):
             if not row['public_id']:
                 raise "no public id"
             try:
-                marker = MediaItemMarker.objects.get(public_id=row['public_id'], item_id=row['item_id'])
+                marker = MediaItemMarker.objects.get(public_id=row['public_id'])
             except MediaItemMarker.DoesNotExist:
                 continue
+            except MediaItemMarker.MultipleObjectsReturned:
+                continue
+            
             marker.time = row['time']
             marker.save()
             
\ No newline at end of file