Skip to content

Commit

Permalink
Mandate host and port in database information
Browse files Browse the repository at this point in the history
  • Loading branch information
weiiwang01 committed Nov 27, 2023
1 parent c766633 commit f13ced7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,8 @@ def _current_effective_db_info(self) -> Optional[types_.DatabaseConfig]:
host, port = self._parse_database_endpoints(
self.database.fetch_relation_field(relation.id, "endpoints")
)
if host is None:
return None
return types_.DatabaseConfig(
hostname=host,
port=port,
Expand Down

0 comments on commit f13ced7

Please sign in to comment.