diff --git a/tools/abel/validators/spreadsheet_validator.py b/tools/abel/validators/spreadsheet_validator.py index e4b9fa27b..8ebcf908f 100644 --- a/tools/abel/validators/spreadsheet_validator.py +++ b/tools/abel/validators/spreadsheet_validator.py @@ -376,16 +376,16 @@ def _ValidateConnections( validation_errors.append( ConnectionDependencyError( row=row_number, - missing_code=connection.get(TARGET_ENTITY_CODE), - present_code=connection.get(SOURCE_ENTITY_CODE), + missing_code=connection.get(SOURCE_ENTITY_CODE), + present_code=connection.get(TARGET_ENTITY_CODE), ) ) if connection[TARGET_ENTITY_CODE] not in codes: validation_errors.append( ConnectionDependencyError( row=row_number, - missing_code=connection[SOURCE_ENTITY_CODE], - present_code=connection[TARGET_ENTITY_CODE], + missing_code=connection.get(TARGET_ENTITY_CODE), + present_code=connection.get(SOURCE_ENTITY_CODE), ) ) return validation_errors