terraform-provider-opennebula
terraform-provider-opennebula copied to clipboard
Fixed type assertion panic in network ID retrieval
Refactored network ID retrieval logic to include checks for nil values and to ensure that the 'id' field is of type float64 before conversion. This prevents a panic caused by improper type assertion and ensures robust error handling in case of missing or invalid network IDs.
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for PR followers and do not help prioritize the request
Description
References
#000
New or Affected Resource(s)
- opennebula_XXXXX
Checklist
- [ ] I have created an issue and I have mentioned it in
References
- [ ] My code follows the style guidelines of this project (use
go fmt
) - [ ] My changes generate no new warnings or errors
- [ ] I have updated the unit tests and they pass succesfuly
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have updated the documentation (if needed)
- [ ] I have updated the changelog file