Hello Yue,

You probably have a model with a ForeignKey where you set on_delete=True.

Best,
Simon

Le mercredi 28 mars 2018 07:11:04 UTC-4, yue lan a écrit :
>
> Hi,
> I think I found a bug of django. My python version is 3.6.3 and Django is 
> 2.0.3.   And the bug is showed below:
>
> File "E:\programfile\python\lib\site-packages\django\db\models\query.py", 
> line 661, in delete
>     collector.collect(del_query)
>   File 
> "E:\programfile\python\lib\site-packages\django\db\models\deletion.py", 
> line 222, in collect
>     field.remote_field.on_delete(self, field, sub_objs, self.using)
> TypeError: 'bool' object is not callable
>
>
> As you can see, field.remote_field.on_delete is a boolean type object but 
> it is trying to call it.
>
>
> <https://lh3.googleusercontent.com/-_hcjH1ohIJQ/WrtUG4CQ3pI/AAAAAAAAAAk/Hp6pX_eZKhkliwLWMSjapmh9D7AOrEoVwCLcBGAs/s1600/test.png>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b89e2ee6-d378-43f8-9262-dd6de1e03911%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to