Skip to content

Commit 65b1e05

Browse files
authored
fix: variables service (#383)
1 parent 9670468 commit 65b1e05

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<groupId>fr.insee</groupId>
1313
<artifactId>Pogues-BO</artifactId>
1414
<packaging>jar</packaging>
15-
<version>4.21.3</version>
15+
<version>4.21.4-SNAPSHOT.0</version>
1616
<name>Pogues-Back-Office</name>
1717

1818
<properties>

src/main/java/fr/insee/pogues/mapper/VariablesMapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ public static VariableDTO toDTO(VariableType variable) throws VariableInvalidMod
137137
((DurationDatatypeType) variable.getDatatype()).getMinimum(),
138138
((DurationDatatypeType) variable.getDatatype()).getMaximum());
139139
case DatatypeTypeEnum.NUMERIC -> datatypeDTO = VariableDTODatatype.numericDatatype(
140-
((NumericDatatypeType) variable.getDatatype()).getMinimum().doubleValue(),
141-
((NumericDatatypeType) variable.getDatatype()).getMaximum().doubleValue(),
140+
((NumericDatatypeType) variable.getDatatype()).getMinimum() != null ? ((NumericDatatypeType) variable.getDatatype()).getMinimum().doubleValue() : null,
141+
((NumericDatatypeType) variable.getDatatype()).getMaximum() != null ? ((NumericDatatypeType) variable.getDatatype()).getMaximum().doubleValue() : null,
142142
((NumericDatatypeType) variable.getDatatype()).getDecimals() != null ? ((NumericDatatypeType) variable.getDatatype()).getDecimals().intValue() : null,
143143
((NumericDatatypeType) variable.getDatatype()).isIsDynamicUnit() != null ? ((NumericDatatypeType) variable.getDatatype()).isIsDynamicUnit() : false,
144144
((NumericDatatypeType) variable.getDatatype()).getUnit());

src/main/java/fr/insee/pogues/model/dto/variables/VariableDTODatatype.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public static VariableDTODatatype durationDatatype(VariableDTODatatypeFormatEnum
7070
null);
7171
}
7272

73-
public static VariableDTODatatype numericDatatype(double minimum, double maximum, Integer decimals, boolean isDynamicUnit, String unit) {
73+
public static VariableDTODatatype numericDatatype(Double minimum, Double maximum, Integer decimals, boolean isDynamicUnit, String unit) {
7474
return new VariableDTODatatype(
7575
VariableDTODatatypeTypeEnum.NUMERIC,
7676
null,

0 commit comments

Comments
 (0)