We do a check against a TransformedRecord's self defined is_valid property here, and if is_valid is False, we bail out and return None. None gets appended to the list of records to return which subsequently crashes import_file in import_salary_data when it is encountered.
We do a check against a TransformedRecord's self defined is_valid property here, and if is_valid is False, we bail out and return None. None gets appended to the list of records to return which subsequently crashes import_file in import_salary_data when it is encountered.

Thankfully, this never happens, because all of our transform functions don't generate lists with invalid records. They access the same property to determine whether to append the return value from record's as_dict method in the first place. Which renders the check in as_dict redundant and irrelevant.

Summing up, this code never runs. If it did run, it would break everything. Taking it out will allow changes that follow to modify code upstream and downstream without a nasty and hard to trace surprise.

texastribune/tx_salaries,texastribune/tx_salaries