diff --git a/scripts/JSON_data_files_validator.py b/scripts/JSON_data_files_validator.py index 0d3e9876f8..5af5f6f154 100644 --- a/scripts/JSON_data_files_validator.py +++ b/scripts/JSON_data_files_validator.py @@ -417,11 +417,10 @@ def validate_comm_links(all_jsons): task_ids = set() for data in all_jsons: - #FIXME: KeyErorr: 'communications' - #if data... get("communications") is not None: - comms = data["phases"][n]["communications"] - comm_ids.update({int(comm["from"]["id"]) for comm in comms}) - comm_ids.update({int(comm["to"]["id"]) for comm in comms}) + if data["phases"][n].get("communications") is not None: + comms = data["phases"][n]["communications"] + comm_ids.update({int(comm["from"]["id"]) for comm in comms}) + comm_ids.update({int(comm["to"]["id"]) for comm in comms}) tasks = data["phases"][n]["tasks"] task_ids.update({int(task["entity"]["id"]) for task in tasks})