restore-backup: Handle PORT being an int, not a str.

This changed in f1ec8163ef.

(cherry picked from commit c9fccaa975)
This commit is contained in:
Alex Vandiver 2026-03-26 17:38:56 +00:00 committed by Alex Vandiver
parent b2daa758b1
commit e104f27533

View File

@ -101,7 +101,7 @@ def restore_backup(tarball_file: IO[bytes], keep_settings: bool, keep_zulipconf:
if db["HOST"] not in ["", "localhost"]:
postgresql_env["PGHOST"] = db["HOST"]
if "PORT" in db:
postgresql_env["PGPORT"] = db["PORT"]
postgresql_env["PGPORT"] = str(db["PORT"])
postgresql_env["PGUSER"] = db["USER"]
if "PASSWORD" in db:
postgresql_env["PGPASSWORD"] = db["PASSWORD"]