From 65470855b3d2dcc14d65152f2927dd9cf9f22736 Mon Sep 17 00:00:00 2001 From: niclas Date: Tue, 12 Mar 2024 14:23:11 +0100 Subject: [PATCH] Fix [cluster] duplicates --- clusters/intelligence-agencies.json | 16 ++++++++-------- tools/IntelAgencies/main.py | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/clusters/intelligence-agencies.json b/clusters/intelligence-agencies.json index fd7b254..e774adc 100644 --- a/clusters/intelligence-agencies.json +++ b/clusters/intelligence-agencies.json @@ -442,8 +442,8 @@ ] }, "related": [], - "uuid": "7ee96458-af7b-423e-8300-002a7389e934", - "value": "Special Branch" + "uuid": "e9ae0f01-4042-4cea-abfd-2fa2c7ed6a5b", + "value": "Special Branch (Bahamas)" }, { "description": "Financial Intelligence Unit (FIU)", @@ -455,8 +455,8 @@ ] }, "related": [], - "uuid": "23a169a2-c94c-433e-98ba-4d0bb65d99a4", - "value": "Financial Intelligence Unit" + "uuid": "75f6a4ce-7654-40e9-9e8e-8a63dcb46804", + "value": "Financial Intelligence Unit (Bahamas)" }, { "description": "NSA – National Security Agency", @@ -689,8 +689,8 @@ ] }, "related": [], - "uuid": "23a169a2-c94c-433e-98ba-4d0bb65d99a4", - "value": "Financial Intelligence Unit" + "uuid": "9c5f95f2-2fd3-4d9b-9863-03117fe8b249", + "value": "Financial Intelligence Unit (Barbados)" }, { "description": "Criminal Investigations Department (CID)", @@ -4418,8 +4418,8 @@ "country_name": "Sri Lanka" }, "related": [], - "uuid": "7ee96458-af7b-423e-8300-002a7389e934", - "value": "Special Branch" + "uuid": "f134c0bd-7ff1-43fc-a128-13459623efb0", + "value": "Special Branch (Sri Lanka)" }, { "description": "Terrorist Investigation Division", diff --git a/tools/IntelAgencies/main.py b/tools/IntelAgencies/main.py index 8f9c45a..a6402fd 100644 --- a/tools/IntelAgencies/main.py +++ b/tools/IntelAgencies/main.py @@ -120,6 +120,10 @@ def get_agencies_from_country(heading, current_country, uuids): if current_country in ["European Union", "Shanghai Cooperation Organisation"]: # Not a country country_name = None + + # Set names for duplicates + if name in ['Special Branch', 'Financial Intelligence Unit']: + name = f'{name} ({current_country})' if uuids and name in uuids: agencies.append(IntelAgency(value=name, uuid=uuids[name], meta=Meta(country=country_code, country_name=country_name, refs=[links], synonyms=synonyms), description=description))