Private
Public Access
1
0

changed admin

This commit is contained in:
Sander Roosendaal
2018-06-28 16:40:07 +02:00
parent 04bbbda2a8
commit 951e707b6e
2 changed files with 14 additions and 5 deletions

View File

@@ -31,16 +31,21 @@ class RowerInline(admin.StackedInline):
('ftp','otwslack','pw_ut2','pw_ut1','pw_at','pw_tr','pw_an','max',
'rest','ut2','ut1','at','tr','an','hrftp',)}),
('Import/Export Keys',
{'fields':('c2token','tokenexpirydate','c2refreshtoken','c2_auto_export',
'sporttrackstoken','sporttrackstokenexpirydate','sporttracksrefreshtoken',
{'fields':('c2token','tokenexpirydate',
'c2refreshtoken','c2_auto_export','c2_auto_import',
'sporttrackstoken','sporttrackstokenexpirydate',
'sporttracksrefreshtoken',
'sporttracks_auto_export',
'underarmourtoken','underarmourtokenexpirydate','underarmourrefreshtoken',
'underarmourtoken','underarmourtokenexpirydate',
'underarmourrefreshtoken',
'mapmyfitness_auto_export',
'tptoken','tptokenexpirydate','tprefreshtoken',
'trainingpeaks_auto_export',
'polartoken','polartokenexpirydate','polarrefreshtoken','polaruserid',
'polartoken','polartokenexpirydate',
'polarrefreshtoken','polaruserid',
'polar_auto_import',
'stravatoken','stravaexportas','strava_auto_export',
'strava_auto_import',
'runkeepertoken','runkeeper_auto_export',)}),
('Team',
{'fields':('friends','privacy','team')}),

View File

@@ -282,8 +282,12 @@ def add_c2_stroke_data_db(strokedata,workoutid,starttimeunix,csvfilename,
res = df.to_csv(csvfilename,index_label='index',
compression='gzip')
data = dataprep(df,id=workoutid,bands=False,debug=debug)
try:
data = dataprep(df,id=workoutid,bands=False,debug=debug)
except:
return 0
return data
# Processes painsled CSV file to database