Opened 15 years ago

Closed 15 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: no UI/UX: no

Description

We have two models

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

class  (db.models):
    ...

Both models registered in admin.py 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 by Luke Plant, 15 years ago

Resolution: duplicate
Status: newclosed

Duplicate of #10262, #7539

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