fix(api): include deleted monitors in name-based lookups
Remove status filter from GetMonitorByNameAndIPVersion query to allow historical score data for deleted monitors to be accessible when querying by monitor name/TLS name, making behavior consistent with ID-based queries.
This commit is contained in:
@@ -17,8 +17,7 @@ select id, id_token, type, user_id, account_id, hostname, location, ip, ip_versi
|
||||
where
|
||||
tls_name like ? AND
|
||||
(ip_version = ? OR (type = 'score' AND ip_version IS NULL)) AND
|
||||
is_current = 1 AND
|
||||
status != 'deleted'
|
||||
is_current = 1
|
||||
order by id
|
||||
limit 1
|
||||
`
|
||||
|
||||
Reference in New Issue
Block a user