Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcsaposs-canonical authored Nov 20, 2023
1 parent a484ef4 commit 515f8aa
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/charms/data_platform_libs/v0/data_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,12 @@ def get_content(self) -> Dict[str, str]:
if self.meta:
try:
self._secret_content = self.meta.get_content(refresh=True)
except (ValueError, ModelError):
except (ValueError, ModelError) as err:
# https://bugs.launchpad.net/juju/+bug/2042596
# Only triggered when 'refresh' is set
msg = "ERROR either URI or label should be used for getting an owned secret but not both"
if isinstance(err, ModelError) and msg not in str(err):
raise
# Due to: ValueError: Secret owner cannot use refresh=True
self._secret_content = self.meta.get_content()
return self._secret_content
Expand Down

0 comments on commit 515f8aa

Please sign in to comment.