We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3916f03 commit c7a4832Copy full SHA for c7a4832
1 file changed
src/charm.py
@@ -2432,13 +2432,16 @@ def relations_user_databases_map(self) -> dict:
2432
"rewind",
2433
):
2434
continue
2435
- user_database_map[user] = ",".join(
+ if databases := ",".join(
2436
sorted(
2437
self.postgresql.list_accessible_databases_for_user(
2438
user, current_host=self.is_connectivity_enabled
2439
)
2440
2441
- )
+ ):
2442
+ user_database_map[user] = databases
2443
+ else:
2444
+ logger.debug(f"User {user} has no databases to connect to")
2445
# Add "landscape" superuser by default to the list when the "db-admin" relation is present
2446
# or when the "database" relation has "extra-user-roles" set to "SUPERUSER" (which may mean
2447
# that PgBouncer is related to the database and there is the possibility that Landscape
0 commit comments