Catch None type in integrationUISP

This commit is contained in:
Robert Chacón 2023-07-21 14:06:51 -06:00 committed by GitHub
parent 5000eab638
commit ea883aebb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -359,7 +359,7 @@ def handleMultipleInternetNodes(sites, dataLinks, uispSite):
uispSite = 'Internet'
for link in dataLinks:
if link['canDelete'] == False:
if link['from']['device']['identification']['id'] == link['to']['device']['identification']['id']:
if link['from']['device'] is not None and link['to']['device'] is not None and link['from']['device']['identification']['id'] == link['to']['device']['identification']['id']:
link['from']['site']['identification']['id'] = '001'
link['from']['site']['identification']['name'] = 'Internet'
# Found internet link