Ensure client is active before attempting to pull plan info
This commit is contained in:
Robert Chacón
2023-02-27 16:55:28 -07:00
committed by GitHub
parent 9b0313a942
commit da42238332

View File

@@ -72,6 +72,7 @@ def createShaper():
# devices on a shared tariff. Creating each service as a combined # devices on a shared tariff. Creating each service as a combined
# entity including the customer, to be on the safe side. # entity including the customer, to be on the safe side.
for customerJson in customers: for customerJson in customers:
if customerJson['status'] == 'active':
services = spylnxRequest("admin/customers/customer/" + customerJson["id"] + "/internet-services", headers) services = spylnxRequest("admin/customers/customer/" + customerJson["id"] + "/internet-services", headers)
for serviceJson in services: for serviceJson in services:
combinedId = "c_" + str(customerJson["id"]) + "_s_" + str(serviceJson["id"]) combinedId = "c_" + str(customerJson["id"]) + "_s_" + str(serviceJson["id"])