diff --git a/inventory_provider/routes/ims_classifier.py b/inventory_provider/routes/ims_classifier.py
index 91ca946be61c3e7ecbc4edd7d311be23c5352802..2e5edb3e206afb0917dbbd63acbf13a6472d8f59 100644
--- a/inventory_provider/routes/ims_classifier.py
+++ b/inventory_provider/routes/ims_classifier.py
@@ -127,7 +127,7 @@ def get_ims_interface(interface: str) -> str:
     return interface.upper()
 
 
-def related_interfaces(hostname:str, interface: str) -> Iterator[str]:
+def related_interfaces(hostname: str, interface: str) -> Iterator[str]:
     r = common.get_current_redis()
     prefix = f'netconf-interfaces:{hostname}:'
     for k in r.keys(prefix + interface + '.*'):
@@ -608,14 +608,14 @@ def get_fiberlink_trap_metadata(ne_name_str: str, object_name_str: str) \
                        x[0]['df_route_id'] == x[1]['df_route_id']]
             if matches:
                 match = matches[0]
-                locations_a = _location_from_equipment(equipment_a, r)
-                locations_b = _location_from_equipment(equipment_b, r)
-                if locations_a:
-                    loc_a = locations_a[0]['a']
+                location_a = _location_from_equipment(equipment_a, r)
+                location_b = _location_from_equipment(equipment_b, r)
+                if location_a:
+                    loc_a = location_a
                 else:
                     loc_a = _LOCATION(equipment_a, '', '')
-                if locations_b:
-                    loc_b = locations_b[0]['a']
+                if location_b:
+                    loc_b = location_b
                 else:
                     loc_b = _LOCATION(equipment_b, '', '')