revert: fix: pointless conditions about systemd/supervisor (#26267)

commit added port numbers in urls which broke links on fc.
This commit is contained in:
Maharshi Patel 2024-05-01 02:01:48 +05:30 committed by GitHub
parent 0696123661
commit 72b1db0ae5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1779,7 +1779,13 @@ def get_url(uri: str | None = None, full_address: bool = False) -> str:
port = frappe.conf.http_port or frappe.conf.webserver_port
if host_name and not url_contains_port(host_name) and port:
if (
not frappe.conf.restart_supervisor_on_update
and not frappe.conf.restart_systemd_on_update
and host_name
and not url_contains_port(host_name)
and port
):
host_name = host_name + ":" + str(port)
return urljoin(host_name, uri) if uri else host_name