Private
Public Access
1
0

bug fixes

This commit is contained in:
Sander Roosendaal
2019-03-03 15:16:37 +01:00
parent 2d9c04159e
commit cd39a25e4c
5 changed files with 8 additions and 8 deletions

View File

@@ -967,7 +967,7 @@ def dataprep(rowdatadf,id=0,bands=True,barchart=True,otwpower=True,
if debug: if debug:
print("dataprep",id) print("dataprep",id)
rowdatadf.set_index([range(len(rowdatadf))],inplace=True) # rowdatadf.set_index([range(len(rowdatadf))],inplace=True)
t = rowdatadf.ix[:,'TimeStamp (sec)'] t = rowdatadf.ix[:,'TimeStamp (sec)']
t = pd.Series(t-rowdatadf.ix[0,'TimeStamp (sec)']) t = pd.Series(t-rowdatadf.ix[0,'TimeStamp (sec)'])

View File

@@ -106,7 +106,7 @@ def make_new_workout_from_email(rower, datafile, name, cntr=0,testing=False):
# shutil.copyfileobj(f_in,f_out) # shutil.copyfileobj(f_in,f_out)
fcopy = "media/"+datafilename fcopy = "media/"+datafilename
if not testing: if not testing:
if settings.DEBUG: if settings.CELERY:
res = handle_sendemail_unrecognized.delay( res = handle_sendemail_unrecognized.delay(
fcopy, fcopy,
rower.user.email rower.user.email

View File

@@ -1449,7 +1449,7 @@ def handle_otwsetpower(self,f1, boattype, weightvalue,
except KeyError: except KeyError:
pass pass
df = getsmallrowdata_db( df = getsmallrowdata_db(
['power', 'workoutid', 'time'], ids=[workoutid], ['power', 'workoutid', 'time'], ids=[encoder.decode_hex(workoutid)],
debug=debug) debug=debug)
thesecs = totaltime thesecs = totaltime
maxt = 1.05 * thesecs maxt = 1.05 * thesecs

View File

@@ -48,11 +48,7 @@
{{ form.as_table }} {{ form.as_table }}
</table> </table>
{% csrf_token %} {% csrf_token %}
<div id="formbutton" class="tooltip"> <p><input class="button" type="submit" value="Update & Run"></p>
<p><input class="button green" type="submit" value="Update & Run"></p>
<span class="tooltiptext">Start the calculations to get power values for your row.</span>
</div>
</form> </form>
</li> </li>

View File

@@ -731,6 +731,10 @@ def get_stored_tasks_status(request):
progress = 0 progress = 0
try: try:
cached_progress = cache.get(id) cached_progress = cache.get(id)
if cached_progress is not None:
cached_progress = int(cached_progress)
else:
cached_progress = 0
except ValueError: except ValueError:
cached_progress = 0 cached_progress = 0
finished = get_job_status(id)['finished'] finished = get_job_status(id)['finished']