Skip to content

Commit 39780a3

Browse files
committed
Clean and rename an attribute
1 parent 5c6c0c1 commit 39780a3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arho_feature_template/project/layers/code_layers.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ def get_id_by_feature_layer_name(cls, layer_name: str) -> str | None:
6868
regulation_group_type = cls.LAYER_NAME_TO_REGULATION_GROUP_TYPE_MAP.get(layer_name)
6969
if not regulation_group_type:
7070
raise LayerNameNotFoundError(layer_name)
71-
attribute_value = cls.get_attribute_value_by_another_attribute_value("id", "value", regulation_group_type)
72-
return cast(str, attribute_value) if attribute_value else attribute_value
71+
regulation_type_id = cls.get_attribute_value_by_another_attribute_value("id", "value", regulation_group_type)
72+
if regulation_type_id:
73+
return cast(str, regulation_type_id)
74+
return None
7375

7476

7577
class PlanRegulationTypeLayer(AbstractCodeLayer):

0 commit comments

Comments
 (0)