solving issue #331
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user