juju / charm-helpers

Apache License 2.0
18 stars 127 forks source link

Ensure get_requests_for_local_unit doesn't fail on incomplete relation #824

Closed ajkavanagh closed 1 year ago

ajkavanagh commented 1 year ago

If the certificates relation has been set from a consuming charm for certificates, but the provider hasn't supplied a certificate, and the request is in the 'legacy' form, then the get_request_for_local_unit() function in cert_utils fails on accessing the (non-existant) 'ca' parameter in the databag. This patch ensures that if the 'ca' key is missing that the processing moves on to the next relation.

Closes LP#2028683