[Django] #32308: docs for db.models.restrict is incorrect

8 views
Skip to first unread message

Django

unread,
Dec 30, 2020, 2:20:46 PM12/30/20
to django-...@googlegroups.com
#32308: docs for db.models.restrict is incorrect
-----------------------------------------+------------------------
Reporter: Eliezer Kanal | Owner: nobody
Type: Bug | Status: new
Component: Documentation | Version: 3.1
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
The example in this section of the text seems incorrect. Specifically,
`artist_two.delete()` has no reason to be restricted, as there are no
`Song` objects for that artist. The `RESTRICT` keyword is only on the
`Song` model.

--
Ticket URL: <https://code.djangoproject.com/ticket/32308>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Dec 30, 2020, 2:38:02 PM12/30/20
to django-...@googlegroups.com
#32308: docs for db.models.restrict is incorrect
-------------------------------+--------------------------------------

Reporter: Eliezer Kanal | Owner: nobody
Type: Bug | Status: closed
Component: Documentation | Version: 3.1
Severity: Normal | Resolution: invalid

Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):

* status: new => closed
* resolution: => invalid


Comment:

Have you try this example? It works as described. `artist_two` cannot be
deleted because it is referenced through restricted foreign keys:
`Song.album`.

Closing per TicketClosingReasons/UseSupportChannels

--
Ticket URL: <https://code.djangoproject.com/ticket/32308#comment:1>

Reply all
Reply to author
Forward
0 new messages