Skip to content

Commit

Permalink
Merge pull request #246 from beawitcht/development
Browse files Browse the repository at this point in the history
update under18 filter
  • Loading branch information
beawitcht authored Sep 25, 2023
2 parents 19f3ad2 + 45135a9 commit 0e4ab9f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/scripts/gics.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ async def on_ready():

options.append((country, f"{service} - Wait time (months): {to_be_seen}" if pd.notna(to_be_seen) else "Unknown"))

# Filter out specific services
options = [gic for gic in options if "GIDS" not in gic[1] and "KOI" not in gic[1] and "Youth" not in gic[1]]
# Filter out under 18 services
youth_services = ["GIDS", "KOI", "Youth", "Hub"]
options = [gic for gic in options if all(service not in gic[1] for service in youth_services)]

# Sort options by months remaining
options.sort(key=lambda x: int(x[1].split(': ')[1][-2:]) if x[1].split(': ')[1] != 'nan' else 9999)
Expand Down

0 comments on commit 0e4ab9f

Please sign in to comment.