Merge tag 'v1.83' into develop
bugfix emailprocessing zip
This commit is contained in:
@@ -189,7 +189,7 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
|
|||||||
summary = ''
|
summary = ''
|
||||||
# handle non-Painsled
|
# handle non-Painsled
|
||||||
if fileformat != 'csv':
|
if fileformat != 'csv':
|
||||||
f3,summary = dataprep.handle_nonpainsled('media/'+f2,fileformat,summary)
|
f3,summary,oarlength,inboard = dataprep.handle_nonpainsled('media/'+f2,fileformat,summary)
|
||||||
else:
|
else:
|
||||||
f3 = 'media/'+f2
|
f3 = 'media/'+f2
|
||||||
|
|
||||||
@@ -227,6 +227,8 @@ def make_new_workout_from_email(rr,f2,name,cntr=0):
|
|||||||
id,message = dataprep.save_workout_database(f2,rr,
|
id,message = dataprep.save_workout_database(f2,rr,
|
||||||
workouttype=workouttype,
|
workouttype=workouttype,
|
||||||
dosummary=dosummary,
|
dosummary=dosummary,
|
||||||
|
inboard=inboard,
|
||||||
|
oarlength=oarlength,
|
||||||
title=name,
|
title=name,
|
||||||
notes='imported through email')
|
notes='imported through email')
|
||||||
|
|
||||||
|
|||||||
@@ -63,15 +63,13 @@ class Command(BaseCommand):
|
|||||||
z = zipfile.ZipFile(a.document)
|
z = zipfile.ZipFile(a.document)
|
||||||
for f in z.namelist():
|
for f in z.namelist():
|
||||||
f2 = z.extract(f,path='media/')
|
f2 = z.extract(f,path='media/')
|
||||||
try:
|
wid = [
|
||||||
wid = [
|
make_new_workout_from_email(rr,f2[6:],name)
|
||||||
make_new_workout_from_email(rr,f2[6:],name)
|
]
|
||||||
]
|
res += wid
|
||||||
res += wid
|
link = 'http://rowsandall.com/rowers/workout/'+str(wid[0])+'/edit'
|
||||||
link = 'http://rowsandall.com/rowers/workout/'+str(wid)+'/edit'
|
dd = send_confirm(rr.user,name,link)
|
||||||
dd = send_confirm(u,name,link)
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
# move attachment and make workout
|
# move attachment and make workout
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user