OCHA-DAP/cod-migration

Handle when CFR Types field is null

Closed this issue · 1 comments

Failing on this one:
https://www.humanitarianresponse.info/en/api/v1.0/datasets/4130

Start processing dataset with Node ID = 4130
Traceback (most recent call last):
  File "gospawn.py", line 113, in <module>
    main()
  File "gospawn.py", line 42, in main
    run_test_full()
  File "gospawn.py", line 107, in run_test_full
    c.migrate(dataset_row)
  File "/home/cj/coding/hdx-gospawn/cod.py", line 182, in migrate
    self.format_dataset()
  File "/home/cj/coding/hdx-gospawn/cod.py", line 426, in format_dataset
    for ty in d['types']:
TypeError: 'NoneType' object is not iterable