opaquification part 1
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user