added makeprivate to email processing
This commit is contained in:
@@ -76,6 +76,7 @@ class Command(BaseCommand):
|
|||||||
w = Workout.objects.get(wid[0])
|
w = Workout.objects.get(wid[0])
|
||||||
r = w.user
|
r = w.user
|
||||||
uploads.do_sync(w,uploadoptions)
|
uploads.do_sync(w,uploadoptions)
|
||||||
|
uploads.make_private(w,uploadoptions)
|
||||||
if 'make_plot' in uploadoptions:
|
if 'make_plot' in uploadoptions:
|
||||||
plottype = uploadoptions['plottype']
|
plottype = uploadoptions['plottype']
|
||||||
res = uploads.make_plot(r,w,f2[6:],
|
res = uploads.make_plot(r,w,f2[6:],
|
||||||
@@ -109,6 +110,7 @@ class Command(BaseCommand):
|
|||||||
w = Workout.objects.get(wid[0])
|
w = Workout.objects.get(wid[0])
|
||||||
r = w.user
|
r = w.user
|
||||||
uploads.do_sync(w,uploadoptions)
|
uploads.do_sync(w,uploadoptions)
|
||||||
|
uploads.make_private(w,uploadoptions)
|
||||||
if 'make_plot' in uploadoptions:
|
if 'make_plot' in uploadoptions:
|
||||||
plottype = uploadoptions['plottype']
|
plottype = uploadoptions['plottype']
|
||||||
res = uploads.make_plot(r,w,a.document,
|
res = uploads.make_plot(r,w,a.document,
|
||||||
|
|||||||
@@ -180,6 +180,13 @@ def make_plot(r,w,f1,f2,plottype,title,imagename='',plotnr=0):
|
|||||||
import c2stuff,stravastuff,sporttracksstuff,runkeeperstuff
|
import c2stuff,stravastuff,sporttracksstuff,runkeeperstuff
|
||||||
import underarmourstuff,tpstuff
|
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):
|
def do_sync(w,options):
|
||||||
if 'upload_to_C2' in options and options['upload_to_C2']:
|
if 'upload_to_C2' in options and options['upload_to_C2']:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user