Commit 18745aa
authored
Correct the generated code for nested parent field reference. (#369)
While generating the code for references for the Lambda function, more specifically for the S3 bucket field, we observe that there is use of array keywords with a non-array field e.g len(S3.Bucket) which is incorrect.
After debugging code-generator, we observe that there was an incorrect piece of code (most likely becasue of copy paste) that considered nested parent field as an array.
This patch fixes this issue by adding the right code for handling nested parent fields.
Unfortunately we cannot add unit tests for this change because this part of the code generation resides inside the template and it's not a part of the pkg/generate/code package.
Fixes aws-controllers-k8s/community#15141 parent 860408d commit 18745aa
1 file changed
+10
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
146 | 156 | | |
147 | 157 | | |
148 | 158 | | |
| |||
0 commit comments