diff --git a/core/panda_client/views.py b/core/panda_client/views.py index 53c2c15f..f47f4659 100644 --- a/core/panda_client/views.py +++ b/core/panda_client/views.py @@ -22,12 +22,21 @@ def client(request): if auth is not None and ('Authorization' in auth and 'Origin' in auth): if len(request.session['requestParams']) > 0: data = request.session['requestParams'] + + if 'taskID' in data and data['taskID'] is not None: + jeditaskid = data['taskID'] + elif 'taskid' in data and data['taskid'] is not None: + jeditaskid = data['taskid'] + else: + jeditaskid = None + info['text'] ='Error! JeditaskID is none' + ###Finish Task - if data['action'] == 'finishtask' and ('taskID' in data and data['taskID'] is not None): - info['text'] = finish_task(auth=auth, jeditaskid=data['taskID']) + if data['action'] == 'finishtask' and jeditaskid is not None: + info['text'] = finish_task(auth=auth, jeditaskid=jeditaskid) ### Kill Task - elif data['action'] == 'killtask' and ('taskID' in data and data['taskID'] is not None): - info['text'] = kill_task(auth=auth, jeditaskid=data['taskID']) + elif data['action'] == 'killtask' and jeditaskid is not None: + info['text'] = kill_task(auth=auth, jeditaskid=jeditaskid) ### Set debug mode elif data['action'] == 'setdebugmode' and ('pandaid' in data and data['pandaid'] is not None): if ('params' in data and data['params'] is not None):