Skip to content

Commit

Permalink
Merge pull request #330 from Gary-Community-Ventures/feat/meal-program
Browse files Browse the repository at this point in the history
Add MealInCounties, meal to urgent_need_functions and need_functions
  • Loading branch information
ivonne-hernandez authored Apr 19, 2024
2 parents c248844 + 1469b16 commit 228eebb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions programs/programs/urgent_needs/urgent_need_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,18 @@ def eligible(cls, screen: Screen):
return screen.county == 'Denver County'


class MealInCounties(UrgentNeedFunction):
dependencies = ['county']

@classmethod
def eligible(cls, screen: Screen):
'''
Household lives in Denver or Jefferson County
'''
eligible_counties = ['Denver County', 'Jefferson County']
return screen.county in eligible_counties


class HelpkitchenZipcode(UrgentNeedFunction):
dependencies = ['zipcode']

Expand Down
3 changes: 3 additions & 0 deletions screener/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,9 @@ def urgent_need_results(screen):
'denver': urgent_need_functions.LivesInDenver.calc(
screen, missing_dependencies
),
'meal': urgent_need_functions.MealInCounties.calc(
screen, missing_dependencies
),
'helpkitchen_zipcode': urgent_need_functions.HelpkitchenZipcode.calc(
screen, missing_dependencies
),
Expand Down

0 comments on commit 228eebb

Please sign in to comment.