django-crm icon indicating copy to clipboard operation
django-crm copied to clipboard

Fix for Account model

Open hasnatnayeem opened this issue 7 years ago • 2 comments

An additional argument "Name" was passed as second parameter while creating the name field in Account model in "accounts" app. So that the column name in both migration and database has become "Name" instead of "name". But the "str" function referenced the name attribute while converting an object to string in django admin panel. That's how it causes an error. screenshot from 2018-07-26 15-51-03

Now I have removed the additional argument from Account model. Also created and applied the migration to the default sqlite database file. Thus the error has been resolved. I would highly appreciate if you could have a look at the changes I made and consider for merging it to your master branch.

hasnatnayeem avatar Jul 26 '18 10:07 hasnatnayeem

Ok thanks! I will test this and merge it

techiediaries avatar Jul 26 '18 10:07 techiediaries

Only removing the second argument solves the problem for me.

name = models.CharField("Name of Account", max_length=64)

gobsar avatar Dec 14 '18 07:12 gobsar