#138 WIP Validity
* adds geometry validity checks for SimpleGeomForm is_valid()
* shows validity problems on the form if a feature is invalid
* optimizes merging of different features into one MultiPolygon
* further enhances tests
* adds as_feature_collection() method on Geometry model for converting geom MultiPolygon attribute into FeatureCollection json holding each polygon as an own feature -> makes each polygon selectable in new netgis map client
This commit is contained in:
@@ -128,6 +128,7 @@ class CompensationWorkflowTestCase(BaseWorkflowTestCase):
|
||||
new_identifier = self.create_dummy_string()
|
||||
new_comment = self.create_dummy_string()
|
||||
new_geometry = MultiPolygon(srid=4326) # Create an empty geometry
|
||||
geojson = self.create_geojson(new_geometry)
|
||||
|
||||
check_on_elements = {
|
||||
self.compensation.title: new_title,
|
||||
@@ -142,7 +143,7 @@ class CompensationWorkflowTestCase(BaseWorkflowTestCase):
|
||||
"title": new_title,
|
||||
"intervention": self.intervention.id, # just keep the intervention as it is
|
||||
"comment": new_comment,
|
||||
"geom": new_geometry.geojson,
|
||||
"geom": geojson,
|
||||
}
|
||||
self.client_user.post(url, post_data)
|
||||
self.compensation.refresh_from_db()
|
||||
|
||||
Reference in New Issue
Block a user