small bug fixes
This commit is contained in:
@@ -1273,8 +1273,7 @@ def new_workout_from_file(r, f2,
|
|||||||
message = None
|
message = None
|
||||||
try:
|
try:
|
||||||
fileformat = get_file_type(f2)
|
fileformat = get_file_type(f2)
|
||||||
print(fileformat,'aa')
|
except (IOError,UnicodeDecodeError):
|
||||||
except IOError:
|
|
||||||
os.remove(f2)
|
os.remove(f2)
|
||||||
message = "Rowsandall could not process this file. The extension is supported but the file seems corrupt. Contact info@rowsandall.com if you think this is incorrect."
|
message = "Rowsandall could not process this file. The extension is supported but the file seems corrupt. Contact info@rowsandall.com if you think this is incorrect."
|
||||||
return (0, message, f2)
|
return (0, message, f2)
|
||||||
|
|||||||
@@ -131,6 +131,10 @@ class RowerPlanMiddleWare(object):
|
|||||||
messages.error(request,messg)
|
messages.error(request,messg)
|
||||||
r = getrower(request.user)
|
r = getrower(request.user)
|
||||||
r.rowerplan = 'basic'
|
r.rowerplan = 'basic'
|
||||||
|
r.paymenttype = 'single'
|
||||||
|
basicplans = PaidPlan.objects.filter(shortname='basic',price=0,
|
||||||
|
paymentprocessor='braintree')
|
||||||
|
r.paidplan = basicplans[0]
|
||||||
r.save()
|
r.save()
|
||||||
# send email
|
# send email
|
||||||
job = myqueue(queue,
|
job = myqueue(queue,
|
||||||
|
|||||||
@@ -227,7 +227,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
Available upgrades
|
Available <a href="/rowers/upgrade/">upgrades</a>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
BIN
rowers/tests/testdata/testdata.csv.gz
vendored
Binary file not shown.
@@ -493,9 +493,12 @@ def get_strava_stream(r,metric,stravaid,series_type='time',fetchresolution='high
|
|||||||
|
|
||||||
for data in s.json():
|
for data in s.json():
|
||||||
y = None
|
y = None
|
||||||
if data['type'] == metric:
|
try:
|
||||||
return np.array(data['data'])
|
if data['type'] == metric:
|
||||||
|
return np.array(data['data'])
|
||||||
|
except TypeError:
|
||||||
|
return None
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def allmonths(startdate,enddate):
|
def allmonths(startdate,enddate):
|
||||||
|
|||||||
Reference in New Issue
Block a user