Merge branch 'release/v5.27'
This commit is contained in:
@@ -48,9 +48,10 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
|
|||||||
except AttributeError:
|
except AttributeError:
|
||||||
filename = fileobj[6:]
|
filename = fileobj[6:]
|
||||||
|
|
||||||
|
|
||||||
# test if file exists and is not empty
|
# test if file exists and is not empty
|
||||||
try:
|
try:
|
||||||
with open(filename,'r') as fop:
|
with open('media/'+filename,'r') as fop:
|
||||||
line = fop.readline()
|
line = fop.readline()
|
||||||
except IOError:
|
except IOError:
|
||||||
return 0
|
return 0
|
||||||
@@ -58,6 +59,7 @@ def processattachment(rower, fileobj, title, uploadoptions,testing=False):
|
|||||||
workoutid = [
|
workoutid = [
|
||||||
make_new_workout_from_email(rower, filename, title,testing=testing)
|
make_new_workout_from_email(rower, filename, title,testing=testing)
|
||||||
]
|
]
|
||||||
|
|
||||||
if workoutid[0]:
|
if workoutid[0]:
|
||||||
link = settings.SITE_URL+reverse(
|
link = settings.SITE_URL+reverse(
|
||||||
rower.defaultlandingpage,
|
rower.defaultlandingpage,
|
||||||
@@ -155,9 +157,6 @@ class Command(BaseCommand):
|
|||||||
else:
|
else:
|
||||||
body = message.get_body()
|
body = message.get_body()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uploadoptions = uploads.upload_options(body)
|
uploadoptions = uploads.upload_options(body)
|
||||||
|
|
||||||
from_address = get_from_address(message)
|
from_address = get_from_address(message)
|
||||||
|
|||||||
Reference in New Issue
Block a user