diff --git a/rowers/mailprocessing.py b/rowers/mailprocessing.py index bb346b73..f40cebe5 100644 --- a/rowers/mailprocessing.py +++ b/rowers/mailprocessing.py @@ -88,7 +88,8 @@ def processattachments(): wid = [make_new_workout_from_email(rr,a.document,name)] res += wid link = 'https://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit' - dd = send_confirm(u,name,link) + if wid != 1: + dd = send_confirm(u,name,link) except: # replace with code to process error res += ['fail: '+name] @@ -138,9 +139,9 @@ def processattachments_debug(): print name wid = [make_new_workout_from_email(rr,a.document,name)] res += wid - print wid link = 'https://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit' - dd = send_confirm(u,name,link) + if wid != 1: + dd = send_confirm(u,name,link) diff --git a/rowers/management/commands/processemail.py b/rowers/management/commands/processemail.py index e0052064..6c0d9c00 100644 --- a/rowers/management/commands/processemail.py +++ b/rowers/management/commands/processemail.py @@ -70,12 +70,14 @@ class Command(BaseCommand): res += wid link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit' try: - dd = send_confirm(rr.user,title,link) + if wid != 1: + dd = send_confirm(rr.user,title,link) time.sleep(10) except: try: time.sleep(10) - dd = send_confirm(rr.user,title,link) + if wid != 1: + dd = send_confirm(rr.user,title,link) except: pass @@ -94,8 +96,10 @@ class Command(BaseCommand): # replace with code to process error res += ['fail: '+name] donotdelete = 1 + wid = 1 try: - dd = send_confirm(rr.user,name,link) + if wid != 1: + dd = send_confirm(rr.user,name,link) time.sleep(10) except: pass