File "/work/IATI-Publishing-Statistics/IATI-Stats/statsrunner/aggregate.py", line 117, in aggregate
dict_sum_inplace(publisher_total, subtotal)
File "/work/IATI-Publishing-Statistics/IATI-Stats/statsrunner/aggregate.py", line 29, in dict_sum_inplace
dict_sum_inplace(d1[k], v)
File "/work/IATI-Publishing-Statistics/IATI-Stats/statsrunner/aggregate.py", line 37, in dict_sum_inplace
d1[k] += v
TypeError: unsupported operand type(s) for +=: 'int' and 'NoneType'
Here is a local test you can run that crashes before this commit and doesn't afterwards:
It would be better to check for int type but i'm not sure what other types are allowed (eg is float?) so as a urgent thing just stopping None crashes is a good start
We saw a crash on live and dev:
Here is a local test you can run that crashes before this commit and doesn't afterwards:
This PR is masking the root error; why is type(None) suddenly coming through? This however should let processing not crash and carry on