@@ -62,7 +62,7 @@ class LAM:
62
62
Req_DBM = DataBagModel (unit = LUM , app = LAM )
63
63
template = Template (provider = Prov_DBM , requirer = Req_DBM )
64
64
foo = Endpoint (charm , "relation_name" , requirer_template = template )
65
- relation = foo .wrap (charm .model .relations [0 ])
65
+ relation = foo .wrap (charm .model .relations ['relation_name' ][ 0 ])
66
66
67
67
valid = relation ._remote_app_data_valid
68
68
@@ -93,7 +93,7 @@ class RUM:
93
93
charm = CharmBase (None ) # type: ignore
94
94
95
95
foo_req = Endpoint (charm , "relation_name" , requirer_template = template )
96
- req_relation = foo_req .wrap (charm .model .relations [0 ])
96
+ req_relation = foo_req .wrap (charm .model .relations ['relation_name' ][ 0 ])
97
97
req_remote_unit_data = req_relation .remote_units_data [req_relation .remote_units [0 ]]
98
98
req_value_foo = req_remote_unit_data .foo
99
99
req_value_bar = req_remote_unit_data .bar
@@ -109,7 +109,7 @@ class RUM:
109
109
charm = CharmBase (None ) # type: ignore
110
110
111
111
foo_prov = Endpoint (charm , "relation_name" , provider_template = template )
112
- prov_relation = foo_prov .wrap (charm .model .relations [0 ])
112
+ prov_relation = foo_prov .wrap (charm .model .relations ['relation_name' ][ 0 ])
113
113
prov_remote_unit_data = prov_relation .remote_units_data [
114
114
prov_relation .remote_units [0 ]
115
115
]
0 commit comments