Private
Public Access
1
0

fixed plan creation form

This commit is contained in:
2024-12-23 14:35:44 +01:00
parent 5b0bfc2718
commit b8ea519589
3 changed files with 3 additions and 2 deletions

View File

@@ -1070,7 +1070,7 @@ def get_workouts_session(r, ps):
def create_sessions_from_json(plansteps, rower, startdate, manager, planbyrscore=False, plan=None,
plan_past_days=False,
asynchronous=False, queue=queue):
asynchronous=True, queue=queue):
trainingdays = plansteps['trainingDays']
planstartdate = startdate
if not asynchronous:

View File

@@ -397,6 +397,7 @@ def create_sessions_from_json_async(plansteps, rower, startdate, manager, planby
elif preferreddate >= timezone.now().date():
create_session = True
if create_session:
ps = PlannedSession(
startdate=preferreddate -

View File

@@ -2777,7 +2777,7 @@ def rower_view_instantplan(request, id='', userid=0):
messages.info(request, 'Your Sessions have been added')
url = reverse('plannedsessions_view')
timeperiod = startdate.strftime(
timeperiod = timezone.now().date().strftime(
'%Y-%m-%d')+'/'+enddate.strftime('%Y-%m-%d')
url = url+'?when='+timeperiod