Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Account model #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix for Account model #1

wants to merge 3 commits into from

Conversation

hasnatnayeem
Copy link

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
Owner

Ok thanks! I will test this and merge it

@gobsar
Copy link

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