Private
Public Access
1
0

Merge branch 'release/v12.18'

This commit is contained in:
Sander Roosendaal
2020-04-24 15:23:57 +02:00
2 changed files with 6 additions and 2 deletions

View File

@@ -1333,7 +1333,8 @@ def add_workout_indoorrace(ws,race,r,recordid=0):
errors.append('For tests and training sessions, selected workouts must all be done on the same date') errors.append('For tests and training sessions, selected workouts must all be done on the same date')
return result,comments,errors,0 return result,comments,errors,0
if ws.count()>1 and race.sessiontype == 'test':
if len(ws)>1 and race.sessiontype == 'test':
errors.append('For tests, you can only attach one workout') errors.append('For tests, you can only attach one workout')
return result,comments,errors,0 return result,comments,errors,0

View File

@@ -1176,7 +1176,10 @@ def sendmail(request):
subject = 'Rowsandall Contact Form:'+form.cleaned_data['subject'] subject = 'Rowsandall Contact Form:'+form.cleaned_data['subject']
message = form.cleaned_data['message'] message = form.cleaned_data['message']
fullemail = firstname + " " + lastname + " " + "<" + email + ">" fullemail = firstname + " " + lastname + " " + "<" + email + ">"
send_mail(subject, message, fullemail, ['info@rowsandall.com']) try:
send_mail(subject, message, fullemail, ['info@rowsandall.com'])
except:
messages.error(request,"Something went wrong trying to send the email")
return HttpResponseRedirect('/rowers/email/thankyou/') return HttpResponseRedirect('/rowers/email/thankyou/')
else: else:
if not success: if not success: