#31219: PROTECT may crash in some situations
-------------------------------------+-------------------------------------
Reporter: Matthias Kestenholz | Owner: nobody
Type: Bug | Status: new
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Description changed by Matthias Kestenholz:
Old description:
> {{{
> ======================================================================
> ERROR: test_protect_via (delete.tests.OnDeleteTests)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "/usr/lib/python3.6/unittest/case.py", line 59, in
> testPartExecutor
> yield
> File "/usr/lib/python3.6/unittest/case.py", line 605, in run
> testMethod()
> File "/home/matthias/Projects/django/tests/delete/tests.py", line 99,
> in test_protect_via
> p.delete()
> File "/home/matthias/Projects/django/django/db/models/base.py", line
> 941, in delete
> collector.collect([self], keep_parents=keep_parents)
> File "/home/matthias/Projects/django/django/db/models/deletion.py",
> line 300, in collect
> error.protected_objects[0].__class__.__name__,
> TypeError: 'itertools.chain' object is not subscriptable
> }}}
>
> Pull request follows.
New description:
{{{
======================================================================
ERROR: test_protect_via (delete.tests.OnDeleteTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
yield
File "/usr/lib/python3.6/unittest/case.py", line 605, in run
testMethod()
File "/home/matthias/Projects/django/tests/delete/tests.py", line 99, in
test_protect_via
p.delete()
File "/home/matthias/Projects/django/django/db/models/base.py", line
941, in delete
collector.collect([self], keep_parents=keep_parents)
File "/home/matthias/Projects/django/django/db/models/deletion.py", line
300, in collect
error.protected_objects[0].__class__.__name__,
TypeError: 'itertools.chain' object is not subscriptable
}}}
Pull request follows.
(By the way, this came up while testing
https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg
/django-developers/WmgqJnQ6ioE/b52uACoPAgAJ / the JSONField GSoC pull
request. Apart from this crash everything worked fine!)
--
--
Ticket URL: <https://code.djangoproject.com/ticket/31219#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.7544d1f72ca77e6649bdad36216631db%40djangoproject.com.