Private
Public Access
1
0

intervals.icu duplicates detection improved

This commit is contained in:
2024-12-31 13:18:34 +01:00
parent b8b9996762
commit 645d774e47
2 changed files with 7 additions and 1 deletions

View File

@@ -377,6 +377,7 @@ class IntervalsIntegration(SyncIntegration):
if not force_download and id in known_interval_ids:
return self.update_workout(id)
record = create_or_update_syncrecord(r, None, intervalsid=id)
if do_async:
@@ -728,7 +729,12 @@ class IntervalsIntegration(SyncIntegration):
try:
id = record['id']
result = self.get_workout(id, do_async=False)
external_id = record['external_id']
try:
w = Workout.objects.get(id=encoder.decode_hex(external_id))
result = self.update_workout(id)
except Workout.DoesNotExist:
result = self.get_workout(id, do_async=False)
except KeyError:
pass

Binary file not shown.