From 60f0322fedc04350d49d43eb1030fe238cc1d4d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9cile=20Vuilleumier?= Date: Mon, 4 Nov 2024 16:23:48 +0100 Subject: [PATCH] Some parameters are optional in the GET response payload for a feature type --- geoservercloud/models/featuretype.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/geoservercloud/models/featuretype.py b/geoservercloud/models/featuretype.py index 2d86bdf..c789bc0 100644 --- a/geoservercloud/models/featuretype.py +++ b/geoservercloud/models/featuretype.py @@ -138,16 +138,16 @@ def from_get_response_payload(cls, content: dict): attributes=feature_type["attributes"]["attribute"], metadata_links=metadata_links, enabled=feature_type["enabled"], - advertised=feature_type["advertised"], circular_arc_present=feature_type["circularArcPresent"], - encode_measures=feature_type["encodeMeasures"], - forced_decimals=feature_type["forcedDecimals"], overriding_service_srs=feature_type["overridingServiceSRS"], pad_with_zeros=feature_type["padWithZeros"], projection_policy=feature_type["projectionPolicy"], service_configuration=feature_type["serviceConfiguration"], - simple_conversion_enabled=feature_type["simpleConversionEnabled"], - skip_number_match=feature_type["skipNumberMatch"], + advertised=feature_type.get("advertised"), + encode_measures=feature_type.get("encodeMeasures"), + forced_decimals=feature_type.get("forcedDecimals"), + simple_conversion_enabled=feature_type.get("simpleConversionEnabled"), + skip_number_match=feature_type.get("skipNumberMatch"), ) def asdict(self) -> dict[str, Any]: