diff --git a/g3w-admin/editing/api/base/views.py b/g3w-admin/editing/api/base/views.py index 2fb47a45b..8513fd607 100644 --- a/g3w-admin/editing/api/base/views.py +++ b/g3w-admin/editing/api/base/views.py @@ -275,6 +275,11 @@ def save_vector_data(self, metadata_layer, post_layer_data, has_transactions, po feature.setAttribute(qgis_field.name(), qgis_layer.dataProvider().defaultValueClause(field_idx)) + # + elif qgis_field.typeName().lower() in ('geometry', ): + if geojson_feature['properties'][qgis_field.name()] == '': + geojson_feature['properties'][qgis_field.name()] = None + # Formatting data if field's type is date, datetime or time # ---------------------------------------------------------- elif qgis_field.typeName().lower() in ('date', 'datetime', 'time', 'timestamp'):