Skip to content

Commit e8ab2f7

Browse files
nmaarnioLKajan
authored andcommitted
Remove lifecycles from PlanFeatures
Lifecycles on plan features are not yet implemented and are not needed for the MVP.
1 parent 4ea1c35 commit e8ab2f7

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

arho_feature_template/core/models.py

-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ def from_config_file(
9797
for group_name in feature_data.get("regulation_groups", [])
9898
if (group := cls.find_matching_group_config(group_name, regulation_group_libraries))
9999
],
100-
lifecycles=[],
101100
plan_id=None,
102101
id_=None,
103102
)
@@ -553,7 +552,6 @@ class PlanFeature:
553552
name: str | None = None
554553
description: str | None = None
555554
regulation_groups: list[RegulationGroup] = field(default_factory=list)
556-
lifecycles: list[LifeCycle] = field(default_factory=list)
557555
plan_id: int | None = None
558556
id_: str | None = None
559557

arho_feature_template/project/layers/plan_layers.py

-4
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@ def model_from_feature(cls, feature: QgsFeature) -> PlanFeature:
162162
RegulationGroupLayer.get_feature_by_id(group_id)
163163
for group_id in RegulationGroupAssociationLayer.get_group_ids_for_feature(feature["id"], cls.name)
164164
]
165-
plan_lifecycle_features = [LifeCycleLayer.get_features_by_plan_id(feature["id"])]
166165

167166
return PlanFeature(
168167
geom=feature.geometry(),
@@ -173,9 +172,6 @@ def model_from_feature(cls, feature: QgsFeature) -> PlanFeature:
173172
regulation_groups=[
174173
RegulationGroupLayer.model_from_feature(feat) for feat in regulation_group_features if feat is not None
175174
],
176-
lifecycles=[
177-
LifeCycleLayer.model_from_feature(feat) for feat in plan_lifecycle_features if feat is not None
178-
],
179175
plan_id=feature["plan_id"],
180176
id_=feature["id"],
181177
)

0 commit comments

Comments
 (0)