Merge branch 'release/v10.29'
This commit is contained in:
@@ -38,7 +38,7 @@ class Command(BaseCommand):
|
||||
else:
|
||||
testing = False
|
||||
|
||||
todaysalerts = Alert.objects.filter(next_run__lte = datetime.date.today(),emailalert=True)
|
||||
todaysalerts = Alert.objects.filter(next_run__lt = datetime.date.today(),emailalert=True)
|
||||
|
||||
for alert in todaysalerts:
|
||||
stats = alerts.alert_get_stats(alert)
|
||||
|
||||
@@ -529,9 +529,14 @@ def add_workout_from_data(user,importid,data,strokedata,
|
||||
try:
|
||||
latcoord = strokedata.loc[:,'lat']
|
||||
loncoord = strokedata.loc[:,'lon']
|
||||
if latcoord.std() == 0 and loncoord.std() == 0 and workouttype == 'water':
|
||||
workouttype = 'rower'
|
||||
except:
|
||||
latcoord = np.zeros(nr_rows)
|
||||
loncoord = np.zeros(nr_rows)
|
||||
if workouttype == 'water':
|
||||
workouttype = 'rower'
|
||||
|
||||
|
||||
|
||||
try:
|
||||
@@ -747,12 +752,18 @@ def handle_strava_import_stroke_data(title,
|
||||
try:
|
||||
lat = coords[:,0]
|
||||
lon = coords[:,1]
|
||||
if lat.std() == 0 and lon.std() == 0 and workouttype == 'water':
|
||||
workouttype = 'rower'
|
||||
except IndexError:
|
||||
lat = np.zeros(len(t))
|
||||
lon = np.zeros(len(t))
|
||||
if workouttype == 'water':
|
||||
workouttype = 'rower'
|
||||
else:
|
||||
lat = np.zeros(len(t))
|
||||
lon = np.zeros(len(t))
|
||||
if workouttype == 'water':
|
||||
workouttype = 'rower'
|
||||
|
||||
strokelength = velo*60./(spm)
|
||||
strokelength[np.isinf(strokelength)] = 0.0
|
||||
|
||||
@@ -809,6 +809,7 @@ def handle_send_email_alert(
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
|
||||
try:
|
||||
report['Median'] = sigdig(stats['median'])
|
||||
except KeyError:
|
||||
@@ -831,6 +832,8 @@ def handle_send_email_alert(
|
||||
'report':report,
|
||||
'first_name':userfirstname,
|
||||
'last_name':userlastname,
|
||||
'startdate':stats['startdate'],
|
||||
'enddate':stats['enddate'],
|
||||
'siteurl':siteurl,
|
||||
'rowerfirstname':rowerfirstname,
|
||||
'alertname':alertname,
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
<p>Dear <strong>{{ first_name }}</strong>,</p>
|
||||
|
||||
<p>
|
||||
Here is the report for your alert <strong>{{ alertname }}</strong> on <a href="{{ siteurl }}">rowsandall.com</a>. This is a report for your athlete {{ rowerfirstname }}.
|
||||
Here is the report for your alert <strong>{{ alertname }}</strong> on <a href="{{ siteurl }}">rowsandall.com</a>. This is a report for your athlete {{ rowerfirstname }}, covering the period from
|
||||
{{ startdate }} to {{ enddate }}.
|
||||
</p>
|
||||
|
||||
{% for text in othertexts %}
|
||||
|
||||
@@ -123,8 +123,8 @@
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<div id="formbutton" class="grid_2 prefix_2 alpha">
|
||||
<input class="button green grid_2" type="submit" value="Save">
|
||||
<div id="formbutton">
|
||||
<input type="submit" value="Save">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -20,7 +20,7 @@ The auto import and export settings only work on <a href="/rowers/paidplans/">a
|
||||
{{ form.as_table }}
|
||||
</table>
|
||||
{% csrf_token %}
|
||||
<input class="button green" type="submit" value="Save">
|
||||
<input type="submit" value="Save">
|
||||
</form>
|
||||
</p>
|
||||
<p>Click on one of the icons below to connect to the service of your
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
{% block title %}Change Workout {% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{% include "monitorjobs.html" %}
|
||||
{% endblock %}
|
||||
|
||||
{% block main %}
|
||||
<p>
|
||||
{% if workout|previousworkout:rower.user %}
|
||||
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user