Skip to content

Commit 07b23e6

Browse files
authored
Early set of read-only-endpoints (#1072)
1 parent 5313db7 commit 07b23e6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/relations/postgresql_provider.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -264,10 +264,11 @@ def update_read_only_endpoint(
264264
relation.id, "password"
265265
)
266266

267-
self.database_provides.set_read_only_uris(
268-
relation.id,
269-
f"postgresql://{user}:{password}@{endpoints}/{database}",
270-
)
267+
if user and password:
268+
self.database_provides.set_read_only_uris(
269+
relation.id,
270+
f"postgresql://{user}:{password}@{endpoints}/{database}",
271+
)
271272
# Reset the creds for the next iteration
272273
user = None
273274
password = None

0 commit comments

Comments
 (0)