From e1acbc7ea39705ce253fb731e98916dfd0d276ec Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Thu, 28 May 2020 12:47:05 -0600 Subject: [PATCH] Only keep editable fields, but assume that a field is editable if the property does not exist Signed-off-by: Taylor Smock --- .../plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java index 9c91674..0bf03c4 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/data/mapwithai/MapWithAILayerInfo.java @@ -322,6 +322,7 @@ public class MapWithAILayerInfo { JsonObject info = reader.readObject(); return info.getJsonArray("fields").getValuesAs(JsonObject.class).stream() + .filter(o -> o.getBoolean("editable", true)) .collect(Collectors.toMap(o -> o.getString("name"), o -> o.getString("alias", null))); } catch (IOException e) { Logging.error(e);