Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#32107 closed Bug (fixed)

ProtectedError/RestrictedError raised from Collector.collect contains iterators.

Reported by: Kwist Owned by: Hasan Ramezani
Component: Database layer (models, ORM) Version: 3.1
Severity: Release blocker Keywords: database delete ProtectedError RestrictedError
Cc: Hasan Ramezani Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Kwist)

#27852

("Cannot delete some instances of model 'A' because they are referenced through protected foreign keys: 'A.protect', 'B.protect'.", <itertools.chain object at 0x7f96b5cb6c40>)

As a result, the repr of exception in Sentry is not informative.

Attachments (1)

objects.patch (3.4 KB ) - added by Kwist 4 years ago.
Patch

Download all attachments as: .zip

Change History (7)

by Kwist, 4 years ago

Attachment: objects.patch added

Patch

comment:1 by Kwist, 4 years ago

Description: modified (diff)
Summary: repr of ProtectedError/RestrictedError raised from Collector.collect is not fully informativeProtectedError/RestrictedError raised from Collector.collect has iterator as protected_objects/restricted_objects

comment:2 by Mariusz Felisiak, 4 years ago

Cc: Hasan Ramezani added
Severity: NormalRelease blocker
Summary: ProtectedError/RestrictedError raised from Collector.collect has iterator as protected_objects/restricted_objectsProtectedError/RestrictedError raised from Collector.collect contains iterators.
Triage Stage: UnreviewedAccepted
Type: Cleanup/optimizationBug
Version: master3.1

comment:3 by Hasan Ramezani, 4 years ago

Has patch: set
Owner: changed from nobody to Hasan Ramezani
Status: newassigned

comment:4 by Mariusz Felisiak, 4 years ago

Triage Stage: AcceptedReady for checkin

comment:5 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

Resolution: fixed
Status: assignedclosed

In 3b1746d5:

Fixed #32107 -- Fixed ProtectedError.protected_objects and RestrictedError.restricted_objects.

Regression in 4ca5c565f4dc9e97845036e86416abc5cfde766c and
ab3cbd8b9a315911248227208630a020cedca08f.

Thanks Vitaliy Yelnik for the report.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 4 years ago

In 2212927:

[3.1.x] Fixed #32107 -- Fixed ProtectedError.protected_objects and RestrictedError.restricted_objects.

Regression in 4ca5c565f4dc9e97845036e86416abc5cfde766c and
ab3cbd8b9a315911248227208630a020cedca08f.

Thanks Vitaliy Yelnik for the report.

Backport of 3b1746d5194778fab15c15dd14c212e0912ec8f3 from master

Note: See TracTickets for help on using tickets.
Back to Top