Skip to content

Commit f432551

Browse files
committed
Adjust gen_data_cement() to pass test
1 parent 29cc47e commit f432551

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

message_ix_models/model/material/data_cement.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ def gen_data_cement(
6969
nodes = nodes_ex_world(s_info.N)
7070

7171
for t in config["technology"]["add"]:
72-
t = t.id
72+
# Retrieve the id if `t` is a Code instance; otherwise use str
73+
t = getattr(t, "id", t)
7374
params = data_cement.loc[(data_cement["technology"] == t), "parameter"].unique()
7475

7576
# Special treatment for time-varying params

0 commit comments

Comments
 (0)