django-editlive icon indicating copy to clipboard operation
django-editlive copied to clipboard

Foreignkey with NULL value gives an error

Open chadmv opened this issue 11 years ago • 1 comments

I have a foreign keyfield that is null. When I try to display it with editlive I get: Uncaught TypeError: Cannot set property '_renderItem' of undefined jquery.editlive.foreignkey.js:57

chadmv avatar Apr 25 '13 23:04 chadmv

I'm not sure it's related to the ForeignKey. This error will happen if you don't have the jQuery UI autocomplete loaded.

Can you provide more information on how you call editlive ?

Also, can you try this:

{% editlive "object.fieldname" widget="foreignkeyFieldSelect" as test %}
{{ test }}

I'm thinking about making the select widget default instead of autocomplete ..

h3 avatar Apr 26 '13 17:04 h3