diff --git a/rowers/management/commands/processemail.py b/rowers/management/commands/processemail.py index 5adffab1..d35156fe 100644 --- a/rowers/management/commands/processemail.py +++ b/rowers/management/commands/processemail.py @@ -134,7 +134,11 @@ class Command(BaseCommand): zip_file = zipfile.ZipFile(attachment.document) for id,filename in enumerate(zip_file.namelist()): datafile = zip_file.extract(filename, path='media/') - title = name+' ('+str(id)+')' + if id>0: + title = name+' ('+str(id+1)+')' + else: + title = name + workoutid = processattachment( rower, datafile, title, uploadoptions, testing=testing