Unwanted comma on line 609 results in code being set to a tuple rather than a string.
|
if hasattr(District, 'code'): |
|
defaults['code'] = item['admin3Code'], |
A comma makes it a tuple (no need for parent, all it takes is one comma).
Solution is to remove the comma from the end of the line. I can do that for you if you want?