Opened 5 years ago
Last modified 5 years ago
#31219 closed Bug
PROTECT may crash in some situations — at Version 2
Reported by: | Matthias Kestenholz | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Release blocker | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
====================================================================== 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!)
Change History (2)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
Description: | modified (diff) |
---|
Note:
See TracTickets
for help on using tickets.
PR