getMainPLC was returning a list instead of an object

This commit is contained in:
Patrick McDonagh
2016-06-06 20:47:24 -05:00
parent 22f20d90a2
commit b750edc4bd

View File

@@ -189,7 +189,7 @@ def setupTags():
def getMainPLC():
get_plc_req_data = {'where': {'id': 0}}
get_plc_request = requests.get('{}/device'.format(web_address), data=get_plc_req_data)
return json.loads(get_plc_request.text)
return json.loads(get_plc_request.text)[0]
def readPoints():