Skip to content

Commit 09242d0

Browse files
committed
fix: SdkFieldV1 maps "measure" to "duration" (TEDEFO-5013)
1 parent 5ff07ff commit 09242d0

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/main/java/eu/europa/ted/eforms/sdk/entity/v1/SdkFieldV1.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,16 @@ public SdkFieldV1(
3434
getRepeatable(repeatable));
3535
}
3636

37+
// In SDK 1.x, "measure" semantically means "duration" (there was no "duration" type yet).
38+
@Override
39+
public String getType() {
40+
String type = super.getType();
41+
if ("measure".equals(type)) {
42+
return "duration";
43+
}
44+
return type;
45+
}
46+
3747
protected static String getCodelistId(Map<String, Map<String, String>> codelist) {
3848
if (codelist == null) {
3949
return null;

0 commit comments

Comments
 (0)