From bda3a9fa3e3f64ae57e9953c957696a3bbb18627 Mon Sep 17 00:00:00 2001 From: Stelios Vitalis Date: Wed, 28 Apr 2021 17:45:13 +0200 Subject: [PATCH] Switch parents and children to simple strings to improve compatibility Related to #35 --- core/layers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/layers.py b/core/layers.py index 1a977dc..25e9339 100644 --- a/core/layers.py +++ b/core/layers.py @@ -129,8 +129,8 @@ def get_fields(self): fields = QgsFields() fields.append(QgsField("uid", QVariant.String)) fields.append(QgsField("type", QVariant.String)) - fields.append(QgsField("parents", QVariant.StringList)) - fields.append(QgsField("children", QVariant.StringList)) + fields.append(QgsField("parents", QVariant.String)) + fields.append(QgsField("children", QVariant.String)) return fields @@ -213,10 +213,10 @@ def create_features(self, fields, object_key, cityobject, read_geometry=True): new_feature["type"] = cityobject["type"] if "parents" in cityobject: - new_feature["parents"] = cityobject["parents"] + new_feature["parents"] = str(cityobject["parents"]) if "children" in cityobject: - new_feature["children"] = cityobject["children"] + new_feature["children"] = str(cityobject["children"]) # Load the attributes if "attributes" in cityobject: