Skip to content

Commit ac476c3

Browse files
committed
fix geometry setting when creating a new plan
1 parent 124e910 commit ac476c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arho_feature_template/project/layers/plan_layers.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ class PlanLayer(AbstractPlanLayer):
7070

7171
@classmethod
7272
def feature_from_model(cls, model: Plan) -> QgsFeature:
73-
feature = cls.initialize_feature_from_model(model)
74-
7573
if not model.geom:
7674
message = "Plan must have a geometry to be added to the layer"
7775
raise ValueError(message)
7876

77+
feature = cls.initialize_feature_from_model(model)
78+
feature.setGeometry(model.geom)
7979
feature["name"] = {LANGUAGE: model.name}
8080
feature["description"] = {LANGUAGE: model.description}
8181
feature["permanent_plan_identifier"] = model.permanent_plan_identifier

0 commit comments

Comments
 (0)