fix graph editing with changeset

This commit is contained in:
Laura Klünder 2019-12-10 21:35:38 +01:00
parent a554a0ceae
commit dabc18b3cb
2 changed files with 3 additions and 2 deletions

View file

@ -250,7 +250,7 @@ editor = {
editor._active_graph_node_html = null;
active_graph_node.remove();
} else {
editor._active_graph_node = parseInt(active_graph_node_id);
editor._active_graph_node = parseInt(active_graph_node_id) || active_graph_node_id;
editor._active_graph_node_html = active_graph_node.html();
}
} else if (editor._active_graph_node_html !== null) {

View file

@ -8,6 +8,7 @@ from c3nav.mapdata.fields import GeometryField, I18nField
from c3nav.mapdata.models.access import AccessRestrictionMixin
from c3nav.mapdata.models.base import SerializableMixin
from c3nav.mapdata.models.geometry.space import SpaceGeometryMixin
from c3nav.mapdata.utils.geometry import smart_mapping
class GraphNode(SpaceGeometryMixin, models.Model):
@ -27,7 +28,7 @@ class GraphNode(SpaceGeometryMixin, models.Model):
@property
def coords(self):
return self.geometry.wrapped_geojson['coordinates']
return smart_mapping(self.geometry)['coordinates']
class WayType(SerializableMixin, models.Model):