fixed plan creation form
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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 -
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user