Private
Public Access
1
0

step adder work in progress

This commit is contained in:
Sander Roosendaal
2022-04-05 18:08:33 +02:00
parent a1e907a090
commit 46cd9a6c2e

View File

@@ -2974,8 +2974,6 @@ def stepadder(request, id=0):
)
ps = get_object_or_404(PlannedSession, pk=id)
print(request.method,'aap')
if request.method != 'POST':
message = {'status': 'false',
'message': 'this view cannot be accessed through GET'}
@@ -2996,7 +2994,17 @@ def stepadder(request, id=0):
'message': 'permission denied for host '+hostt[0]}
return JSONResponse(status=403, data=message)
print(post_data)
steps = {
"filename": "",
}
for id in post_data:
try:
step = PlannedSessionStep.objects.get(id=int(id))
print(step.name)
# add JSON
except PlannedSessionStep.DoesNotExist:
print('fail')
pass
return JSONResponse(status=200,data=post_data)