Skip to content

Commit

Permalink
🐛 Fix more than one geometry field on editing update.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlorenzetti committed Oct 10, 2023
1 parent a311932 commit da1beec
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 @@ -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'):
Expand Down

0 comments on commit da1beec

Please sign in to comment.