Commit 5435570
authored
Fix update generation with additionalIdentifiers (#732)
* Disable unhelpful pylint warning
pylint insists that `with` should be used on all disposable resources
but in this case the constructor call is in a helper method and the
consuming method does already use `with`. Given that this is a private
method it should be fine to ignore the warning in all cases.
* Fix update generation with additionalIdentifiers
If the `additionalIdentifiers` property is present in a resource schema
the `generate_update_example` method in `resource_client` will not work,
because it checks for unique keys from the create_model and passes
`self._additional_identifiers_paths` to a method that expects a list of
tuples of string, whereas it receives a list of sets of tuples of
string and will fail with
```
AttributeError: 'tuple' object has no attribute 'split'
```
Instead, check if the key is in any of the additional identifiers.
Related issue
-------------
#7311 parent a9ab27a commit 5435570
File tree
3 files changed
+27
-5
lines changed- src/rpdk/core
- contract
- tests/contract
3 files changed
+27
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
294 | 301 | | |
295 | 302 | | |
296 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
514 | 514 | | |
515 | 515 | | |
516 | 516 | | |
| 517 | + | |
| 518 | + | |
517 | 519 | | |
518 | 520 | | |
519 | 521 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
83 | 96 | | |
84 | 97 | | |
85 | 98 | | |
| |||
157 | 170 | | |
158 | 171 | | |
159 | 172 | | |
160 | | - | |
161 | | - | |
| 173 | + | |
| 174 | + | |
162 | 175 | | |
163 | 176 | | |
164 | 177 | | |
| |||
181 | 194 | | |
182 | 195 | | |
183 | 196 | | |
184 | | - | |
| 197 | + | |
185 | 198 | | |
186 | 199 | | |
187 | 200 | | |
| |||
195 | 208 | | |
196 | 209 | | |
197 | 210 | | |
198 | | - | |
| 211 | + | |
199 | 212 | | |
200 | 213 | | |
201 | 214 | | |
| |||
0 commit comments