@@ -49,7 +49,7 @@ public static <I extends Identifiable<I>> String getFieldValue(FieldType field,
4949 case GENERATOR -> getGeneratorFieldValue (field , propertyName , (Generator ) identifiable );
5050 case LOAD -> getLoadFieldValue (field , propertyName , (Load ) identifiable );
5151 case SHUNT_COMPENSATOR -> getShuntCompensatorFieldValue (field , propertyName , (ShuntCompensator ) identifiable );
52- case BUS -> getBusFieldValue (field , (Bus ) identifiable );
52+ case BUS -> getBusFieldValue (field , (Bus ) identifiable , propertyName );
5353 case BUSBAR_SECTION -> getBusBarSectionFieldValue (field , (BusbarSection ) identifiable );
5454 case BATTERY -> getBatteryFieldValue (field , propertyName , (Battery ) identifiable );
5555 case SUBSTATION -> getSubstationFieldValue (field , (Substation ) identifiable );
@@ -229,12 +229,13 @@ private static String getGeneratorStartupFieldValue(Generator generator, FieldTy
229229 }
230230 }
231231
232- private static String getBusFieldValue (FieldType field , Bus bus ) {
232+ private static String getBusFieldValue (FieldType field , Bus bus , String propertyName ) {
233233 return switch (field ) {
234234 case COUNTRY ,
235235 NOMINAL_VOLTAGE ,
236236 VOLTAGE_LEVEL_ID ,
237- SUBSTATION_ID -> getVoltageLevelFieldValue (field , null , bus .getVoltageLevel ());
237+ SUBSTATION_ID ,
238+ SUBSTATION_PROPERTIES -> getVoltageLevelFieldValue (field , propertyName , bus .getVoltageLevel ());
238239 default -> throw new PowsyblException (FIELD_AND_TYPE_NOT_IMPLEMENTED + " [" + field + "," + bus .getType () + "]" );
239240 };
240241 }
0 commit comments