From 8c23014c83ee6a4cd251e08a0bc6fd8c79cd734b Mon Sep 17 00:00:00 2001 From: Yoan Le Clanche Date: Thu, 16 Jun 2022 10:12:03 +0200 Subject: [PATCH] Fix marker import : https://trackers.pilotsystems.net/prebarreau/0463 --- teleforma/management/commands/teleforma-import-markers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.39.5