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

'unicode' object has no attribute 'url' #329

Open
nikolaysm opened this issue Apr 5, 2018 · 3 comments
Open

'unicode' object has no attribute 'url' #329

nikolaysm opened this issue Apr 5, 2018 · 3 comments

Comments

@nikolaysm
Copy link

Dear,

I get error if i do post and the form has been filled out incorrectly. On line 163 in djng/forms/widgets.py.

'unicode' object has no attribute 'url'
Value is "u'Drop image here or click to upload" but must be None because imagefield was empty

@jrief
Copy link
Owner

jrief commented Apr 5, 2018

Django version?

@nikolaysm
Copy link
Author

django== 1.11

@nikolaysm
Copy link
Author

nikolaysm commented Apr 5, 2018

It can be fixed by checking for unicode?

if not isinstance(value, unicode) and value:
    ...

That is not a good solution, because it seems that imagefield is empty.

@nikolaysm nikolaysm reopened this Apr 10, 2018
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

No branches or pull requests

2 participants