solving issue #331
This commit is contained in:
@@ -1840,7 +1840,16 @@ class AdvancedWorkoutForm(ModelForm):
|
|||||||
class RowerExportForm(ModelForm):
|
class RowerExportForm(ModelForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = Rower
|
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
|
# Simple form to set rower's Functional Threshold Power
|
||||||
class RowerPowerForm(ModelForm):
|
class RowerPowerForm(ModelForm):
|
||||||
|
|||||||
@@ -11678,8 +11678,11 @@ def rower_exportsettings_view(request):
|
|||||||
if request.method == 'POST':
|
if request.method == 'POST':
|
||||||
form = RowerExportForm(request.POST)
|
form = RowerExportForm(request.POST)
|
||||||
if form.is_valid():
|
if form.is_valid():
|
||||||
stravaexportas = form.cleaned_data['stravaexportas']
|
cd = form.cleaned_data
|
||||||
r.stravaexportas = stravaexportas
|
|
||||||
|
for attr, value in cd.items():
|
||||||
|
setattr(r, attr, value)
|
||||||
|
|
||||||
r.save()
|
r.save()
|
||||||
else:
|
else:
|
||||||
form = RowerExportForm(instance=r)
|
form = RowerExportForm(instance=r)
|
||||||
|
|||||||
Reference in New Issue
Block a user