Skip to content

Commit

Permalink
Merge pull request #37 from Amsterdam/pre-release/3.1.1
Browse files Browse the repository at this point in the history
Added more descriptive error message in validate_import()
  • Loading branch information
kramer65 authored Jun 11, 2020
2 parents 2dbe8fc + 175142b commit f8b8a9e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/bouwdossiers/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ def validate_import(min_bouwdossiers_count):

assert result['total'] > min_bouwdossiers_count, \
f'Imported total of {result["total"]} bouwdossiers is less than the required number {min_bouwdossiers_count}'
assert result['has_panden'] > 0.8 * result['total']
assert result['has_panden'] > 0.8 * result['total'], \
f"{result['has_panden']} number of records of a total of {result['total']} records " \
f"({result['has_panden'] / result['total'] * 100}%) has one or more panden, " \
f"which is less than the required minimum of {0.8 * result['total']} (80%)"
assert result['has_nummeraanduidingen'] > 0.8 * result['total']
assert result['has_openbareruimte_id'] > 0.95 * result['total']

0 comments on commit f8b8a9e

Please sign in to comment.