Private
Public Access
1
0

better steps serializer

This commit is contained in:
Sander Roosendaal
2021-03-01 08:19:16 +01:00
parent fa42d313b0
commit dffaacc5a3
4 changed files with 36 additions and 15 deletions

View File

@@ -1927,8 +1927,8 @@ def plannedsession_view(request,id=0,userid=0):
r = getrequestplanrower(request,userid=userid)
ps = get_object_or_404(PlannedSession,pk=id)
if ps.steps_json is not None:
jsons = json.loads(ps.steps_json)
if ps.steps is not None:
jsons = ps.steps
else:
jsons = {}
@@ -2143,8 +2143,8 @@ def plannedsession_view(request,id=0,userid=0):
comments = PlannedSessionComment.objects.filter(plannedsession=ps).order_by("created")
steps = ''
if ps.steps_json:
d = json.loads(ps.steps_json)
if ps.steps:
d = ps.steps
steps = ps_dict_get_description_html(d)