Skip to content

Fix for Account model#1

Open
hasnatnayeem wants to merge 3 commits into
techiediaries:masterfrom
hasnatnayeem:master
Open

Fix for Account model#1
hasnatnayeem wants to merge 3 commits into
techiediaries:masterfrom
hasnatnayeem:master

Conversation

@hasnatnayeem
Copy link
Copy Markdown

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.

@techiediaries
Copy link
Copy Markdown
Owner

Ok thanks! I will test this and merge it

@gobsar
Copy link
Copy Markdown

gobsar commented Dec 14, 2018

Only removing the second argument solves the problem for me.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants