diff --git a/inventory_provider/routes/classifier.py b/inventory_provider/routes/classifier.py
index a64a662d9f80d0a1ab56c01cf565636a44ae80ad..7ae881e1a9bc4559e93b395a40de1f59a502ce88 100644
--- a/inventory_provider/routes/classifier.py
+++ b/inventory_provider/routes/classifier.py
@@ -21,7 +21,13 @@ def _LOCATION(equipment, name, abbreviation):
     }
 
 
-def _unique_dicts_from_list(l):
+def _remove_duplicates_from_list(l):
+    """
+    removes duplicates from the input list
+    the list items must be encodable as json
+    :param l:
+    :return: a new list with unique elements
+    """
     tmp_dict = dict([(json.dumps(item, sort_keys=True), item) for item in l])
     return list(tmp_dict.values())
 
@@ -194,7 +200,7 @@ def get_juniper_link_info(source_equipment, interface):
         if not result['locations']:
             result['locations'] = [_location_from_router(source_equipment)]
 
-        result['locations'] = _unique_dicts_from_list(result['locations'])
+        result['locations'] = _remove_duplicates_from_list(result['locations'])
         result = json.dumps(result)
         # cache this data for the next call
         r.set(cache_key, result.encode('utf-8'))
@@ -344,7 +350,7 @@ def peer_info(address):
                 result['locations'] += [
                     _location_from_service_dict(s) for s in i['services']]
 
-        result['locations'] = _unique_dicts_from_list(result['locations'])
+        result['locations'] = _remove_duplicates_from_list(result['locations'])
         result = json.dumps(result)
         # cache this data for the next call
         r.set(cache_key, result.encode('utf-8'))