From: Yoan Le Clanche Date: Thu, 16 Jun 2022 08:12:03 +0000 (+0200) Subject: Fix marker import : https://trackers.pilotsystems.net/prebarreau/0463 X-Git-Tag: 2.8.1-pro~113^2^2~3 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=8c23014c83ee6a4cd251e08a0bc6fd8c79cd734b;p=teleforma.git Fix marker import : https://trackers.pilotsystems.net/prebarreau/0463 --- diff --git a/teleforma/management/commands/teleforma-import-markers.py b/teleforma/management/commands/teleforma-import-markers.py index 6529c609..297ea64b 100644 --- a/teleforma/management/commands/teleforma-import-markers.py +++ b/teleforma/management/commands/teleforma-import-markers.py @@ -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