From 79215766e48cc536fd76e63877d3074ea0d21e77 Mon Sep 17 00:00:00 2001 From: Tony Mack Date: Thu, 10 Nov 2011 21:36:45 -0500 Subject: [PATCH] only add location if longitude and latitude are not null --- sfa/plc/aggregate.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sfa/plc/aggregate.py b/sfa/plc/aggregate.py index efff8595..18a51232 100644 --- a/sfa/plc/aggregate.py +++ b/sfa/plc/aggregate.py @@ -185,8 +185,9 @@ class Aggregate: # add site/interface info to nodes. # assumes that sites, interfaces and tags have already been prepared. site = sites_dict[node['site_id']] - location = Location({'longitude': site['longitude'], 'latitude': site['latitude']}) - rspec_node['location'] = location + if site['longitude'] and site['latitude']: + location = Location({'longitude': site['longitude'], 'latitude': site['latitude']}) + rspec_node['location'] = location rspec_node['interfaces'] = [] if_count=0 for if_id in node['interface_ids']: -- 2.47.0