going through the tests
This commit is contained in:
@@ -3,7 +3,7 @@ from rowers.models import Rower, User, Workout, TombStone, PlannedSession
|
||||
from rowingdata import rowingdata
|
||||
from rowingdata import FITParser as FP
|
||||
from rowingdata.otherparsers import FitSummaryData
|
||||
from rowers.rower_rules import user_is_not_basic, user_is_coachee
|
||||
#from rowers.rower_rules import user_is_not_basic, user_is_coachee
|
||||
from rowers.dataroutines import totaltime_sec_to_string
|
||||
|
||||
from rowers import mytypes
|
||||
@@ -720,21 +720,20 @@ class IntervalsIntegration(SyncIntegration):
|
||||
def import_activities(self, event, *args, **kwargs):
|
||||
if not self.rower.intervals_auto_import:
|
||||
return 0
|
||||
if user_is_not_basic(self.rower.user) or user_is_coachee(self.rower.user):
|
||||
try:
|
||||
record = event["activity"]
|
||||
except KeyError:
|
||||
records = []
|
||||
|
||||
try:
|
||||
id = record['id']
|
||||
result = self.get_workout(id, do_async=False)
|
||||
except KeyError:
|
||||
pass
|
||||
try:
|
||||
record = event["activity"]
|
||||
except KeyError:
|
||||
records = []
|
||||
|
||||
return 1
|
||||
try:
|
||||
id = record['id']
|
||||
result = self.get_workout(id, do_async=False)
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
return 1
|
||||
|
||||
return 0
|
||||
|
||||
def delete_activities(self, event, *args, **kwargs):
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user