Private
Public Access
1
0

improving syncrecord functionality, now also for workout export

This commit is contained in:
2023-07-19 19:57:22 +02:00
parent a897a496c2
commit 1404d7b80a
6 changed files with 41 additions and 21 deletions

View File

@@ -1,5 +1,5 @@
from .integrations import SyncIntegration, NoTokenError, create_or_update_syncrecord
from rowers.models import User, Rower, Workout, TombStone, SyncRecord
from .integrations import SyncIntegration, NoTokenError, create_or_update_syncrecord, get_known_ids
from rowers.models import User, Rower, Workout, TombStone
from django.db.utils import IntegrityError
from rowers import mytypes
@@ -185,9 +185,7 @@ class NKIntegration(SyncIntegration):
# get NK IDs
nkids = [item['id'] for item in jsondata]
knownnkids = uniqify([
record.nkid for record in SyncRecord.objects.filter(rower=r)
])
knownnkids = get_known_ids(r, 'nkid')
workouts = []