Skip to content

Commit

Permalink
Merge pull request #953 from hotosm/hotfixes
Browse files Browse the repository at this point in the history
hotfix: cleanData function is called only if data extracts is available
  • Loading branch information
nrjadkry authored Oct 31, 2023
2 parents 566d4ef + 36d03d8 commit 42d77d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/backend/app/projects/project_crud.py
Original file line number Diff line number Diff line change
Expand Up @@ -1524,9 +1524,13 @@ def generate_appuser_files(
boundary = {"type": "Feature", "properties": {}, "geometry": outline}
data_extract = pg.execQuery(boundary)
filter = FilterData(xlsform)
filtered_data_extract = filter.cleanData(data_extract)

updated_data_extract = {"type": "FeatureCollection", "features": []}
filtered_data_extract = (
filter.cleanData(data_extract)
if data_extract
else updated_data_extract
)

# Collect feature mappings for bulk insert
feature_mappings = []
Expand Down

0 comments on commit 42d77d6

Please sign in to comment.