Private
Public Access
1
0

opaquification part 1

This commit is contained in:
Sander Roosendaal
2019-01-03 20:50:36 +01:00
parent e42583d4f9
commit f901258b9b
11 changed files with 314 additions and 175 deletions

View File

@@ -77,7 +77,7 @@ from rowsandall_app.settings import SITE_URL
from rowers.mytypes import otwtypes
from rowers.database import *
from rowers.opaque import encoder
# mapping the DB column names to the CSV file column names
@@ -1139,7 +1139,7 @@ def save_workout_database(f2, r, dosmooth=True, workouttype='rower',
btvalues=btvalues.to_json())
return (w.id, message)
return (encoder.encode_hex(w.id), message)
parsers = {
'kinomap': KinoMapParser,
@@ -1404,7 +1404,7 @@ def split_workout(r, parent, splitsecond, splitmode):
setprivate=setprivate,
forceunit='N')
messages.append(message)
ids.append(id)
ids.append(encoder.encode_hex(id))
if 'keep second' in splitmode:
data2['cumdist'] = data2['cumdist'] - data2.iloc[
0,
@@ -1431,7 +1431,7 @@ def split_workout(r, parent, splitsecond, splitmode):
setprivate=setprivate,
dt=dt, forceunit='N')
messages.append(message)
ids.append(id)
ids.append(encoder.encode_hex(id))
if not 'keep original' in splitmode:
if 'keep second' in splitmode or 'keep first' in splitmode:
@@ -1439,7 +1439,7 @@ def split_workout(r, parent, splitsecond, splitmode):
messages.append('Deleted Workout: ' + parent.name)
else:
messages.append('That would delete your workout')
ids.append(parent.id)
ids.append(encoder.encode_hex(parent.id))
elif 'originalprivate' in splitmode:
parent.privacy = 'hidden'
parent.save()