diff --git a/.github/scripts/check_duplicates.py b/.github/scripts/check_duplicates.py index cb84aace3b..a47cdb2fb3 100644 --- a/.github/scripts/check_duplicates.py +++ b/.github/scripts/check_duplicates.py @@ -62,6 +62,14 @@ def compare_preferences(prof1, prof2): else: return False +def compare_metadata(prof1, prof2): + if "metadata" in prof1 and "metadata" in prof2: + return prof1["metadata"] == prof2["metadata"] + elif "metadata" not in prof1 and "metadata" not in prof2: + return True + else: + return False + def compare_components(prof1, prof2): if len(prof1["components"]) == len(prof2["components"]): for y, new_component in enumerate(prof1["components"]): @@ -119,6 +127,7 @@ def compare_components(prof1, prof2): - preferences must be the same ''' if(compare_preferences(new_profile_map, current_profile_map) == True and + compare_metadata(new_profile_map, current_profile_map) == True and compare_components(new_profile_map, current_profile_map) == True): print("%s and %s are duplicates!\n" % (new_profile, current_profile)) duplicate_pairs.append((new_profile, current_profile))