Skip to content

Commit

Permalink
Switch parents and children to simple strings to improve compatibility
Browse files Browse the repository at this point in the history
Related to #35
  • Loading branch information
liberostelios committed Apr 28, 2021
1 parent e7501f1 commit bda3a9f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions core/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit bda3a9f

Please sign in to comment.