Private
Public Access
1
0

added makeprivate to email processing

This commit is contained in:
Sander Roosendaal
2017-09-26 14:01:15 +02:00
parent 2a4d0100d2
commit 44d9e0648d
2 changed files with 9 additions and 0 deletions

View File

@@ -76,6 +76,7 @@ class Command(BaseCommand):
w = Workout.objects.get(wid[0])
r = w.user
uploads.do_sync(w,uploadoptions)
uploads.make_private(w,uploadoptions)
if 'make_plot' in uploadoptions:
plottype = uploadoptions['plottype']
res = uploads.make_plot(r,w,f2[6:],
@@ -109,6 +110,7 @@ class Command(BaseCommand):
w = Workout.objects.get(wid[0])
r = w.user
uploads.do_sync(w,uploadoptions)
uploads.make_private(w,uploadoptions)
if 'make_plot' in uploadoptions:
plottype = uploadoptions['plottype']
res = uploads.make_plot(r,w,a.document,

View File

@@ -180,6 +180,13 @@ def make_plot(r,w,f1,f2,plottype,title,imagename='',plotnr=0):
import c2stuff,stravastuff,sporttracksstuff,runkeeperstuff
import underarmourstuff,tpstuff
def make_private(w,options):
if 'makeprivate' in options and options['makeprivate']:
w.privacy = 'hidden'
w.save()
return 1
def do_sync(w,options):
if 'upload_to_C2' in options and options['upload_to_C2']:
try: