Skip to content

Commit

Permalink
Case layer with more than one geometry field. (#615)
Browse files Browse the repository at this point in the history
Co-authored-by: wlorenzetti <[email protected]>
  • Loading branch information
wlorenzetti and wlorenzetti authored Oct 11, 2023
1 parent 7ec5c8f commit 09121ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions g3w-admin/editing/api/base/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,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'):
Expand Down

0 comments on commit 09121ec

Please sign in to comment.