jrief / django-angular

Let AngularJS play well with Django
http://django-angular.awesto.com/
MIT License
1.23k stars 293 forks source link

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

Open nikolaysm opened 6 years ago

nikolaysm commented 6 years ago

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 commented 6 years ago

Django version?

nikolaysm commented 6 years ago

django== 1.11

nikolaysm commented 6 years ago

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.