anthony-tresontani / django-adaptors

Convert CSV/XML files into python object or django model
BSD 3-Clause "New" or "Revised" License
59 stars 44 forks source link

error occured when define exclude = ['name1','name2'] #15

Open zhijiasun opened 10 years ago

zhijiasun commented 10 years ago

as i understand the exclude should be a list. but when i define the exclude = ['name1','name2'], error occurs as follows: append() takes exactly one argument (2 given) Exception Location: ...../lib/python2.7/site-packages/adaptor/model.py in get_exclusion_fields, line 312 i think the code should be changed to : if hasattr(cls, "Meta") and hasattr(cls.Meta, "exclude"): list_exclusion.extend(cls.Meta.exclude)

martinszy commented 7 years ago

Oops, I just run in to this again... is the app not maintained now?

jm9e commented 4 years ago

Just ran into the same problem.

The problem is this line:

list_exclusion.append(*cls.Meta.exclude)

which should be

list_exclusion.extend(cls.Meta.exclude)