Private
Public Access
1
0

Merge branch 'release/v13.65'

This commit is contained in:
Sander Roosendaal
2020-07-24 10:42:32 +02:00
5 changed files with 16 additions and 4 deletions

View File

@@ -853,6 +853,7 @@ class Rower(models.Model):
strava_auto_export = models.BooleanField(default=False) strava_auto_export = models.BooleanField(default=False)
strava_auto_import = models.BooleanField(default=False) strava_auto_import = models.BooleanField(default=False)
strava_auto_delete = models.BooleanField(default=False)
runkeepertoken = models.CharField(default='',max_length=200, runkeepertoken = models.CharField(default='',max_length=200,
blank=True,null=True) blank=True,null=True)
runkeeper_auto_export = models.BooleanField(default=False) runkeeper_auto_export = models.BooleanField(default=False)
@@ -3443,6 +3444,7 @@ class RowerExportForm(ModelForm):
'sporttracks_auto_export', 'sporttracks_auto_export',
'strava_auto_export', 'strava_auto_export',
'strava_auto_import', 'strava_auto_import',
'strava_auto_delete',
'trainingpeaks_auto_export', 'trainingpeaks_auto_export',
] ]

View File

@@ -57,6 +57,11 @@
Garmin Connnect has no manual sync, so connecting your account to your Garmin account will Garmin Connnect has no manual sync, so connecting your account to your Garmin account will
automatically auto-sync workouts from Garmin to Rowsandall (but not in the other direction). automatically auto-sync workouts from Garmin to Rowsandall (but not in the other direction).
</p> </p>
<p>
Strava Auto Import also imports activity changes on Strava to Rowsandall, except when you delete
a workout on Strava. If you want Deletions to propagate to Rowsandall, tick the Strava Auto Delete
check box.
</p>
<p>Click on one of the icons below to connect to the service of your <p>Click on one of the icons below to connect to the service of your
choice or to renew the authorization.</p> choice or to renew the authorization.</p>
<p><a href="/rowers/me/stravaauthorize/"><img src="/static/img/ConnectWithStrava.png" alt="connect with strava" width="120"></a></p> <p><a href="/rowers/me/stravaauthorize/"><img src="/static/img/ConnectWithStrava.png" alt="connect with strava" width="120"></a></p>

View File

@@ -1098,6 +1098,7 @@ def strava_webhook_view(request):
f.write(' ') f.write(' ')
f.write('Rower not found') f.write('Rower not found')
return HttpResponse(status=200) return HttpResponse(status=200)
if Rower.strava_auto_delete:
for w in ws: for w in ws:
if w.user == r: if w.user == r:
w.delete() w.delete()

View File

@@ -307,6 +307,7 @@ def rower_exportsettings_view(request,userid=0):
'sporttracks_auto_export':'sporttrackstoken', 'sporttracks_auto_export':'sporttrackstoken',
'strava_auto_export':'stravatoken', 'strava_auto_export':'stravatoken',
'strava_auto_import':'stravatoken', 'strava_auto_import':'stravatoken',
'strava_auto_delete':'stravatoken',
'trainingpeaks_auto_export':'tptoken', 'trainingpeaks_auto_export':'tptoken',
} }
r = getrequestrower(request,userid=userid) r = getrequestrower(request,userid=userid)

View File

@@ -4980,7 +4980,10 @@ def workout_upload_view(request,
copyfile(f2,f3) copyfile(f2,f3)
f3 = f3[6:] f3 = f3[6:]
a = MessageAttachment(message=msg,document=f3) a = MessageAttachment(message=msg,document=f3)
try:
a.save() a.save()
except DataError:
pass
os.remove(f2) os.remove(f2)
messages.info( messages.info(