Skip to content

Commit

Permalink
Fixing PanDA client
Browse files Browse the repository at this point in the history
  • Loading branch information
Foorth committed May 24, 2023
1 parent 618fdc3 commit d39d95e
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions core/panda_client/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit d39d95e

Please sign in to comment.