diff --git a/Products/Zing/datamaps.py b/Products/Zing/datamaps.py index 597cf4552c..1facdf4ede 100644 --- a/Products/Zing/datamaps.py +++ b/Products/Zing/datamaps.py @@ -155,7 +155,6 @@ def _generate_facts(self, facts_per_device, zing_tx_state): device_organizers_fact = ZFact.organizer_fact_from_device(device) for (f, ctx) in facts: - # Return datamap fact comp_uuid = f.metadata.get( ZFact.DimensionKeys.CONTEXT_UUID_KEY, "" @@ -163,7 +162,8 @@ def _generate_facts(self, facts_per_device, zing_tx_state): zing_tx_state.already_generated_device_info_facts.add( comp_uuid ) - yield f + if f.is_valid(): + yield f if ctx is None: for component in device.getDeviceComponents(): if component.getUUID() == comp_uuid: @@ -171,7 +171,6 @@ def _generate_facts(self, facts_per_device, zing_tx_state): break comp_groups = [] if ctx is not None and ctx.is_device_component: - # organizers and impact relationships facts for the component comp_groups = ctx._obj.getComponentGroupNames() # organizers fact for the component diff --git a/Products/Zing/fact.py b/Products/Zing/fact.py index 847fe66e78..fcea00f03b 100644 --- a/Products/Zing/fact.py +++ b/Products/Zing/fact.py @@ -88,7 +88,8 @@ def update(self, other): self.data.update(other) def is_valid(self): - return self.metadata.get(DimensionKeys.CONTEXT_UUID_KEY) is not None + uuid = self.metadata.get(DimensionKeys.CONTEXT_UUID_KEY) + return uuid is not None and uuid is not "" def set_context_uuid_from_object(self, obj): self.metadata[DimensionKeys.CONTEXT_UUID_KEY] = get_context_uuid(obj)