added exception for internet connector JSON file without group[]
This commit is contained in:
parent
471887eac0
commit
090b4e1cc8
17
push.py
17
push.py
|
@ -268,6 +268,12 @@ for connector in config.sections():
|
|||
logging.debug(f"CONFIG cxp: {section['cxp']}")
|
||||
body['cxp'] = section['cxp']
|
||||
|
||||
if 'size' in body:
|
||||
logging.debug(f"JSON size: {body['size']}")
|
||||
if 'size' in section:
|
||||
logging.debug(f"CONFIG size: {section['size']}")
|
||||
body['size'] = section['size']
|
||||
|
||||
if 'segments' in body:
|
||||
logging.debug(f"JSON segments: {body['segments'][0]}")
|
||||
if 'segments' in section:
|
||||
|
@ -280,18 +286,17 @@ for connector in config.sections():
|
|||
logging.debug(f"CONFIG group: {section['group']}")
|
||||
body['group'] = section['group']
|
||||
|
||||
if 'group' not in body:
|
||||
if 'group' in section:
|
||||
logging.debug(f"CONFIG group: {section['group']}")
|
||||
body['group'] = section['group']
|
||||
|
||||
if 'billingTags' in body:
|
||||
logging.debug(f"JSON billingtags: {body['billingTags'][0]}")
|
||||
if 'billingtags' in section:
|
||||
logging.debug(f"CONFIG billingtags: {section['billingtags']}")
|
||||
body['billingTags'][0] = section['billingtags']
|
||||
|
||||
if 'size' in body:
|
||||
logging.debug(f"JSON size: {body['size']}")
|
||||
if 'size' in section:
|
||||
logging.debug(f"CONFIG size: {section['size']}")
|
||||
body['size'] = section['size']
|
||||
|
||||
if 'services' in connector_name and 'credentialId' in body and 'service_credentialid' in locals():
|
||||
logging.debug(f'API credentialid: {service_credentialid}')
|
||||
body['credentialId'] = service_credentialid
|
||||
|
|
Loading…
Reference in New Issue