Skip to content

Commit

Permalink
check contract usability
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisSchinnerl committed Dec 17, 2024
1 parent 300333f commit 7ea2cb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions stores/sql/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2237,10 +2237,10 @@ EXISTS (
h.settings,
h.v2_settings
FROM hosts h
INNER JOIN contracts c on c.host_id = h.id and c.archival_reason IS NULL
INNER JOIN contracts c on c.host_id = h.id and c.archival_reason IS NULL AND c.usability = ?
INNER JOIN host_checks hc on hc.db_host_id = h.id
WHERE %s
GROUP by h.id`, strings.Join(whereExprs, " AND ")))
GROUP by h.id`, strings.Join(whereExprs, " AND ")), contractUsabilityGood)
if err != nil {
return nil, fmt.Errorf("failed to fetch hosts: %w", err)
}
Expand Down

0 comments on commit 7ea2cb4

Please sign in to comment.