Opened 9 years ago

Closed 8 years ago

#12003 closed (duplicate)

Admin application deltes related objects on "null=True" relation.

Reported by: x_O Owned by: nobody
Component: contrib.admin Version: 1.1
Severity: Keywords: admin delete remove related null True
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


We have two models

class First(db.models):
    second_item = models.ForeignKey('Second',null=True)

class  (db.models):

Both models registered in as AdminModels.

Trying to delete object created from "Second" class
which is RELATED to other one created from "First" class, admin tells that will remove also that "First" object. Important is that relation in
ForeignKey is null.

My interpretation of that "null=True" for admin.contrib: should set First objects with 'second_item' attribute = None.

Checked against 1.1.

Change History (1)

comment:1 Changed 8 years ago by Luke Plant

Resolution: duplicate
Status: newclosed

Duplicate of #10262, #7539

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