Skip to content

Commit

Permalink
Add status==ACTIVE filter
Browse files Browse the repository at this point in the history
  • Loading branch information
bra-fsn committed Jun 18, 2024
1 parent 01711fc commit f7ce5a3
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions inspector/inspector.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,12 @@ def available_servers(vendor: str | None = None, region: str | None = None):
engine = create_engine(f"sqlite:///{path}")
session = Session(engine)
stmt = (select(
ServerPrice.vendor_id,
Region.api_reference,
Zone.api_reference,
Server)
ServerPrice.vendor_id,
Region.api_reference,
Zone.api_reference,
Server
)
.where(ServerPrice.status == "ACTIVE")
.join(Region, Region.region_id == ServerPrice.region_id)
.join(Zone, Zone.zone_id == ServerPrice.zone_id)
.join(Server)
Expand Down

0 comments on commit f7ce5a3

Please sign in to comment.