Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Layer feature with more than one geometry field fail on editing update #614

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading