Private
Public Access
1
0

Merge branch 'release/v10.29'

This commit is contained in:
Sander Roosendaal
2019-09-28 16:08:52 +02:00
8 changed files with 24 additions and 5 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ class Command(BaseCommand):
else: else:
testing = False 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: for alert in todaysalerts:
stats = alerts.alert_get_stats(alert) stats = alerts.alert_get_stats(alert)
+11
View File
@@ -529,9 +529,14 @@ def add_workout_from_data(user,importid,data,strokedata,
try: try:
latcoord = strokedata.loc[:,'lat'] latcoord = strokedata.loc[:,'lat']
loncoord = strokedata.loc[:,'lon'] loncoord = strokedata.loc[:,'lon']
if latcoord.std() == 0 and loncoord.std() == 0 and workouttype == 'water':
workouttype = 'rower'
except: except:
latcoord = np.zeros(nr_rows) latcoord = np.zeros(nr_rows)
loncoord = np.zeros(nr_rows) loncoord = np.zeros(nr_rows)
if workouttype == 'water':
workouttype = 'rower'
try: try:
@@ -747,12 +752,18 @@ def handle_strava_import_stroke_data(title,
try: try:
lat = coords[:,0] lat = coords[:,0]
lon = coords[:,1] lon = coords[:,1]
if lat.std() == 0 and lon.std() == 0 and workouttype == 'water':
workouttype = 'rower'
except IndexError: except IndexError:
lat = np.zeros(len(t)) lat = np.zeros(len(t))
lon = np.zeros(len(t)) lon = np.zeros(len(t))
if workouttype == 'water':
workouttype = 'rower'
else: else:
lat = np.zeros(len(t)) lat = np.zeros(len(t))
lon = np.zeros(len(t)) lon = np.zeros(len(t))
if workouttype == 'water':
workouttype = 'rower'
strokelength = velo*60./(spm) strokelength = velo*60./(spm)
strokelength[np.isinf(strokelength)] = 0.0 strokelength[np.isinf(strokelength)] = 0.0
+3
View File
@@ -809,6 +809,7 @@ def handle_send_email_alert(
except KeyError: except KeyError:
pass pass
try: try:
report['Median'] = sigdig(stats['median']) report['Median'] = sigdig(stats['median'])
except KeyError: except KeyError:
@@ -831,6 +832,8 @@ def handle_send_email_alert(
'report':report, 'report':report,
'first_name':userfirstname, 'first_name':userfirstname,
'last_name':userlastname, 'last_name':userlastname,
'startdate':stats['startdate'],
'enddate':stats['enddate'],
'siteurl':siteurl, 'siteurl':siteurl,
'rowerfirstname':rowerfirstname, 'rowerfirstname':rowerfirstname,
'alertname':alertname, 'alertname':alertname,
+2 -1
View File
@@ -4,7 +4,8 @@
<p>Dear <strong>{{ first_name }}</strong>,</p> <p>Dear <strong>{{ first_name }}</strong>,</p>
<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> </p>
{% for text in othertexts %} {% for text in othertexts %}
+2 -2
View File
@@ -123,8 +123,8 @@
{{ form.as_table }} {{ form.as_table }}
</table> </table>
{% csrf_token %} {% csrf_token %}
<div id="formbutton" class="grid_2 prefix_2 alpha"> <div id="formbutton">
<input class="button green grid_2" type="submit" value="Save"> <input type="submit" value="Save">
</div> </div>
</form> </form>
</div> </div>
+1 -1
View File
@@ -20,7 +20,7 @@ The auto import and export settings only work on <a href="/rowers/paidplans/">a
{{ form.as_table }} {{ form.as_table }}
</table> </table>
{% csrf_token %} {% csrf_token %}
<input class="button green" type="submit" value="Save"> <input type="submit" value="Save">
</form> </form>
</p> </p>
<p>Click on one of the icons below to connect to the service of your <p>Click on one of the icons below to connect to the service of your
+4
View File
@@ -5,6 +5,10 @@
{% block title %}Change Workout {% endblock %} {% block title %}Change Workout {% endblock %}
{% block scripts %}
{% include "monitorjobs.html" %}
{% endblock %}
{% block main %} {% block main %}
<p> <p>
{% if workout|previousworkout:rower.user %} {% if workout|previousworkout:rower.user %}
Binary file not shown.