-
Notifications
You must be signed in to change notification settings - Fork 29
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
'NoneType' object is not subscriptable #10
Comments
Same problem here. @erikdrums did you have to patch the library or where does your fix go ? |
This works for me @olivierdalang:
|
I've opened a PR on dal to make widget rendering a bit more robust to handle this case yourlabs/django-autocomplete-light#860 |
Also this #12 will make setting the id a lot easier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following along and implementing the example I get "'NoneType' object is not subscriptable".
https://github.com/yourlabs/django-autocomplete-light/blob/master/src/dal/widgets.py#L133
expects attrs to have an 'id' key. It defaults to None and doesn't check before calling the 'id' key.
https://github.com/shamanu4/dal_admin_filters/blob/master/dal_admin_filters/__init__.py#L47
doesn't explicitly set attrs. I haven't looked too much into it. For me everything works if I set a bogus 'id'.
But it of course it is not really the way to go.
The text was updated successfully, but these errors were encountered: