inheritance in gluing
This commit is contained in:
@@ -196,6 +196,15 @@ def join_workouts(r,ids,title='Joined Workout',
|
|||||||
|
|
||||||
# reorder in chronological order
|
# reorder in chronological order
|
||||||
ws = Workout.objects.filter(id__in=ids).order_by("date", "starttime")
|
ws = Workout.objects.filter(id__in=ids).order_by("date", "starttime")
|
||||||
|
|
||||||
|
if not parent:
|
||||||
|
parent = ws[0]
|
||||||
|
oarlength = parent.oarlength
|
||||||
|
inboard = parent.inboard
|
||||||
|
workouttype = parent.workouttype
|
||||||
|
notes = parent.notes
|
||||||
|
summary = parent.summary
|
||||||
|
|
||||||
files = [w.csvfilename for w in ws]
|
files = [w.csvfilename for w in ws]
|
||||||
|
|
||||||
row = rdata(files[0])
|
row = rdata(files[0])
|
||||||
|
|||||||
@@ -4225,11 +4225,11 @@ def workouts_join_view(request):
|
|||||||
if message:
|
if message:
|
||||||
messages.error(request,message)
|
messages.error(request,message)
|
||||||
|
|
||||||
url = reverse(workout_edit_view,
|
url = reverse(r.defaultlandingpage,
|
||||||
kwargs = {
|
kwargs = {
|
||||||
'id':int(id),
|
'id':int(id),
|
||||||
})
|
})
|
||||||
|
|
||||||
return HttpResponseRedirect(url)
|
return HttpResponseRedirect(url)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user