Renaming exitconditions to User Choice

This commit is contained in:
Vivek Teega 2019-05-29 12:00:13 +05:30
parent d520da7c68
commit 8d7b985e97

View File

@ -239,15 +239,15 @@ def getcontractinfo():
'SELECT attribute,value FROM contractstructure') 'SELECT attribute,value FROM contractstructure')
result = c.fetchall() result = c.fetchall()
returnval = {'exitconditions': []} returnval = {'userChoice': []}
temp = 0 temp = 0
for row in result: for row in result:
if row[0] == 'exitconditions': if row[0] == 'exitconditions':
if temp == 0: if temp == 0:
returnval["exitconditions"] = [row[1]] returnval["userChoice"] = [row[1]]
temp = temp + 1 temp = temp + 1
else: else:
returnval['exitconditions'].append(row[1]) returnval['userChoice'].append(row[1])
continue continue
returnval[row[0]] = row[1] returnval[row[0]] = row[1]