From: Tony Mack Date: Fri, 11 Nov 2011 02:36:45 +0000 (-0500) Subject: only add location if longitude and latitude are not null X-Git-Tag: sfa-1.1-3~48 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=79215766e48cc536fd76e63877d3074ea0d21e77;p=sfa.git only add location if longitude and latitude are not null --- 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']: