bug fix javascript upload
This commit is contained in:
@@ -847,11 +847,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
|
|||||||
|
|
||||||
return (w.id, message)
|
return (w.id, message)
|
||||||
|
|
||||||
|
def parsenonpainsled(fileformat,f2,summary):
|
||||||
def handle_nonpainsled(f2, fileformat, summary=''):
|
|
||||||
oarlength = 2.89
|
|
||||||
inboard = 0.88
|
|
||||||
hasrecognized = False
|
|
||||||
# handle RowPro:
|
# handle RowPro:
|
||||||
if (fileformat == 'rp'):
|
if (fileformat == 'rp'):
|
||||||
row = RowProParser(f2)
|
row = RowProParser(f2)
|
||||||
@@ -936,6 +932,19 @@ def handle_nonpainsled(f2, fileformat, summary=''):
|
|||||||
summary = s.summarytext
|
summary = s.summarytext
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
hasrecognized = True
|
||||||
|
|
||||||
|
return row,hasrecognized,summary
|
||||||
|
|
||||||
|
def handle_nonpainsled(f2, fileformat, summary=''):
|
||||||
|
oarlength = 2.89
|
||||||
|
inboard = 0.88
|
||||||
|
hasrecognized = False
|
||||||
|
try:
|
||||||
|
row,hasrecognized = parsenonpainsled(fileformat,f2,summary)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
# Handle c2log
|
# Handle c2log
|
||||||
if (fileformat == 'c2log' or fileformat == 'rowprolog'):
|
if (fileformat == 'c2log' or fileformat == 'rowprolog'):
|
||||||
|
|||||||
@@ -209,10 +209,13 @@
|
|||||||
},
|
},
|
||||||
success: function(result) {
|
success: function(result) {
|
||||||
console.log('got something back');
|
console.log('got something back');
|
||||||
console.log(result);
|
console.log(result);
|
||||||
if (result.result == 1) {
|
if (result.result == 1) {
|
||||||
window.location.href = result.url;
|
window.location.href = result.url;
|
||||||
}
|
} else {
|
||||||
|
console.log(result," reloading");
|
||||||
|
location.reload();
|
||||||
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user