Skip to content

Commit

Permalink
Trivial fix for humanitarian needs to handle invalid rows (#188)
Browse files Browse the repository at this point in the history
* Trivial fix

* Update CHANGELOG.md
  • Loading branch information
mcarans authored Oct 16, 2024
1 parent efc4c3b commit b066623
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [0.10.12] - 2024-10-16

### Fixed

- Error in handling admin2_ref in humanitarian needs

## [0.10.11] - 2024-10-16

### Changed
Expand Down
2 changes: 2 additions & 0 deletions src/hapi/pipelines/database/humanitarian_needs.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ def populate(self) -> None:
for row in rows:
countryiso3 = row["Country ISO3"]
admin2_ref = self.get_admin2_ref(row, dataset_name, errors)
if not admin2_ref:
continue
provider_admin1_name = get_provider_name(row, "Admin 1 Name")
provider_admin2_name = get_provider_name(row, "Admin 2 Name")
sector = row["Sector"]
Expand Down

0 comments on commit b066623

Please sign in to comment.