[MIG] maintenance_service_http_monitoring: Migration to 18.0
This commit is contained in:
@@ -42,7 +42,7 @@ class ServiceInstance(models.Model):
|
||||
now = fields.Datetime.now()
|
||||
url = rec.service_url
|
||||
if not url.lower().startswith("https://"):
|
||||
url = "https://" + url.lstrip("http://")
|
||||
url = "https://" + url.removeprefix("http://").removeprefix("HTTP://")
|
||||
try:
|
||||
response = requests.get(url, timeout=HTTP_CHECK_TIMEOUT)
|
||||
status_code = response.status_code
|
||||
|
||||
Reference in New Issue
Block a user