Skip to content

Commit 0594ee3

Browse files
committed
PR comment
1 parent 874c61e commit 0594ee3

File tree

1 file changed

+2
-5
lines changed
  • src/india_api/internal/inputs/indiadb

1 file changed

+2
-5
lines changed

src/india_api/internal/inputs/indiadb/client.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,8 @@ def get_predicted_power_production_for_location(
8989
with self._get_session() as session:
9090
sites = get_sites_by_country(session, country="india")
9191

92-
# just select wind site
93-
sites = [s for s in sites if s.asset_type == asset_type]
94-
95-
# just select region
96-
sites = [site for site in sites if site.region == location]
92+
# just select wind site and region
93+
sites = [s for s in sites if (s.asset_type == asset_type) and (s.region == location)]
9794

9895
if len(sites) == 0:
9996
raise HTTPException(

0 commit comments

Comments
 (0)