Private
Public Access
1
0

solving issue #331

This commit is contained in:
Sander Roosendaal
2018-06-21 18:13:04 +02:00
parent 172ea9e974
commit 9661bb2124
2 changed files with 15 additions and 3 deletions

View File

@@ -1840,7 +1840,16 @@ class AdvancedWorkoutForm(ModelForm):
class RowerExportForm(ModelForm):
class Meta:
model = Rower
fields = ['stravaexportas']
fields = [
'stravaexportas',
'polar_auto_import',
'c2_auto_export',
'mapmyfitness_auto_export',
'runkeeper_auto_export',
'sporttracks_auto_export',
'strava_auto_export',
'trainingpeaks_auto_export',
]
# Simple form to set rower's Functional Threshold Power
class RowerPowerForm(ModelForm):

View File

@@ -11678,8 +11678,11 @@ def rower_exportsettings_view(request):
if request.method == 'POST':
form = RowerExportForm(request.POST)
if form.is_valid():
stravaexportas = form.cleaned_data['stravaexportas']
r.stravaexportas = stravaexportas
cd = form.cleaned_data
for attr, value in cd.items():
setattr(r, attr, value)
r.save()
else:
form = RowerExportForm(instance=r)