Wednesday, March 28, 2018

A django bug on Queryset.delete

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.


--
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+unsubscribe@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/5994d94b-4d83-46dd-b15c-1f75b74370df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment