in _create_related_objects() we call field's .clean() method for some properties of related objects (like model_comments). However when doing update rather than import, fields not given in CSV are removed from self.fieds. That resulted in KeyError when model_comments (and possibly others) was not specified. Rather than accessing field via self.field, we use self.base_fields that has all the fields still
in
_create_related_objects()
we call field's.clean()
method for some properties of related objects (likemodel_comments
). However when doing update rather than import, fields not given in CSV are removed fromself.fieds
. That resulted inKeyError
whenmodel_comments
(and possibly others) was not specified. Rather than accessing field viaself.field
, we useself.base_fields
that has all the fields still