membershipworks: Use get_attname_column()
to get correct field name/column
This commit is contained in:
parent
18a811ce44
commit
b8b6e7abf1
@ -22,11 +22,12 @@ class BaseModel(models.Model):
|
||||
if field.auto_created or field.many_to_many or not field.concrete:
|
||||
continue
|
||||
|
||||
csv_header = field.column
|
||||
if field.name in cls._csv_headers_override:
|
||||
field_name, csv_header = field.get_attname_column()
|
||||
|
||||
if field_name in cls._csv_headers_override:
|
||||
csv_header = cls._csv_headers_override[field.name]
|
||||
|
||||
yield field.name, data[csv_header]
|
||||
yield field_name, data[csv_header]
|
||||
|
||||
@classmethod
|
||||
def from_csv_dict(cls, data):
|
||||
|
Loading…
Reference in New Issue
Block a user