Private
Public Access
1
0

Merge branch 'release/v22.6.7'

This commit is contained in:
2024-12-27 15:33:02 +01:00
4 changed files with 22 additions and 11 deletions

View File

@@ -497,7 +497,10 @@ class IntervalsIntegration(SyncIntegration):
# got data # got data
if data: if data:
ps.name = data['name'] ps.name = data['name']
ps.comment = data['description'] try:
ps.comment = data['description']
except KeyError:
ps.comment = ''
ps.startdate = arrow.get(data['start_date_local']).datetime ps.startdate = arrow.get(data['start_date_local']).datetime
ps.enddate = arrow.get(data['end_date_local']).datetime ps.enddate = arrow.get(data['end_date_local']).datetime
ps.preferreddate = arrow.get(data['start_date_local']).datetime ps.preferreddate = arrow.get(data['start_date_local']).datetime

View File

@@ -117,16 +117,16 @@ class Command(BaseCommand):
lines = traceback.format_exception(exc_type, exc_value, exc_traceback) lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
dologging('processemail.log', ''.join('!! ' + line for line in lines)) dologging('processemail.log', ''.join('!! ' + line for line in lines))
rowers = Rower.objects.filter(intervals_auto_import=True) #rowers = Rower.objects.filter(intervals_auto_import=True)
for r in rowers: #for r in rowers:
try: # try:
if user_is_not_basic(r.user) or user_is_coachee(r.user): # if user_is_not_basic(r.user) or user_is_coachee(r.user):
intervals_integration = IntervalsIntegration(r.user) # intervals_integration = IntervalsIntegration(r.user)
_ = intervals_integration.get_workouts() # _ = intervals_integration.get_workouts()
except: # except:
exc_type, exc_value, exc_traceback = sys.exc_info() # exc_type, exc_value, exc_traceback = sys.exc_info()
lines = traceback.format_exception(exc_type, exc_value, exc_traceback) # lines = traceback.format_exception(exc_type, exc_value, exc_traceback)
dologging('processemail.log', ''.join('!! ' + line for line in lines)) # dologging('processemail.log', ''.join('!! ' + line for line in lines))
self.stdout.write(self.style.SUCCESS( self.stdout.write(self.style.SUCCESS(
'Successfully processed email attachments')) 'Successfully processed email attachments'))

View File

@@ -137,8 +137,16 @@
<a class="small" <a class="small"
href="https://intervals.icu/?w={{ ps.preferreddate }}"><i class="fa-kit fa-solid-wave-pulse-circle-check"></i></a> href="https://intervals.icu/?w={{ ps.preferreddate }}"><i class="fa-kit fa-solid-wave-pulse-circle-check"></i></a>
{% else %} {% else %}
{% if request.GET.startdate %}
<a class="small" <a class="small"
href="/rowers/sessions/{{ ps.id }}/tointervals/?next={{ request.path }}?startdate={{ request.GET.startdate }}&enddate={{ request.GET.enddate }}"><i class="fa-solid fa-wave-pulse"></i></a> href="/rowers/sessions/{{ ps.id }}/tointervals/?next={{ request.path }}?startdate={{ request.GET.startdate }}&enddate={{ request.GET.enddate }}"><i class="fa-solid fa-wave-pulse"></i></a>
{% elif request.GET.when %}
<a class="small"
href="/rowers/sessions/{{ ps.id }}/tointervals/?next={{ request.path }}?when={{ request.GET.when }}"><i class="fa-solid fa-wave-pulse"></i></a>
{% else %}
<a class="small"
href="/rowers/sessions/{{ ps.id }}/tointervals/?next={{ request.path }}"><i class="fa-solid fa-wave-pulse"></i></a>
{% endif %}
{% endif %} {% endif %}
</td> </td>
{% endif %} {% endif %}

Binary file not shown.