tested
This commit is contained in:
@@ -1875,7 +1875,9 @@ def dataprep(rowdatadf, id=0, bands=True, barchart=True, otwpower=True,
|
|||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
df2 = dd.from_pandas(df, npartitions=1)
|
df2 = dd.from_pandas(df, npartitions=1)
|
||||||
df2.to_parquet(filename, engine='fastparquet', compression='GZIP')
|
df2.to_parquet(filename, engine='fastparquet', compression='GZIP')
|
||||||
|
except FileExistsError:
|
||||||
|
os.remove(filename)
|
||||||
|
df.to_parquet(filename, engine='fastparquet', compression='GZIP')
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
BIN
rowers/tests/testdata/testdata.tcx.gz
vendored
Binary file not shown.
@@ -370,11 +370,14 @@ def course_view(request, id=0):
|
|||||||
coursecompleted=True).order_by("duration", "-distance")
|
coursecompleted=True).order_by("duration", "-distance")
|
||||||
|
|
||||||
# get own training results
|
# get own training results
|
||||||
ownrecords = CourseTestResult.objects.filter(
|
if not request.user.is_anonymous:
|
||||||
courseid = course.id,
|
ownrecords = CourseTestResult.objects.filter(
|
||||||
userid = r.id,
|
courseid = course.id,
|
||||||
coursecompleted=True
|
userid = r.id,
|
||||||
).order_by("duration", "-distance")
|
coursecompleted=True
|
||||||
|
).order_by("duration", "-distance")
|
||||||
|
else:
|
||||||
|
ownrecords = []
|
||||||
|
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
notsharing = Rower.objects.filter(
|
notsharing = Rower.objects.filter(
|
||||||
|
|||||||
Reference in New Issue
Block a user