[Django] #26595: w.save() is called after w = r.waiter_set.create(name='Joe') in one-to-one relationship

24 views
Skip to first unread message

Django

unread,
May 6, 2016, 11:48:52 PM5/6/16
to django-...@googlegroups.com
#26595: w.save() is called after w = r.waiter_set.create(name='Joe') in one-to-one
relationship
-------------------------------+--------------------
Reporter: shiblystory | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
[https://docs.djangoproject.com/en/1.9/topics/db/examples/one_to_one/]


{{{
>>> w = r.waiter_set.create(name='Joe')
>>> w.save()
}}}

w.save() should not be called.

Can someone please edit this?

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

Django

unread,
May 7, 2016, 12:14:24 AM5/7/16
to django-...@googlegroups.com
#26595: w.save() is called after w = r.waiter_set.create(name='Joe') in one-to-one
relationship
-------------------------------+--------------------------------------

Reporter: shiblystory | Owner: nobody
Type: Uncategorized | Status: new
Component: Documentation | Version: 1.9
Severity: Normal | Resolution:
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 shiblystory):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Old description:

> [https://docs.djangoproject.com/en/1.9/topics/db/examples/one_to_one/]
>

> {{{
> >>> w = r.waiter_set.create(name='Joe')
> >>> w.save()
> }}}
>
> w.save() should not be called.
>
> Can someone please edit this?

New description:

[https://docs.djangoproject.com/en/1.9/topics/db/examples/one_to_one/]


{{{
>>> w = r.waiter_set.create(name='Joe')
>>> w.save()
}}}

w.save() should not be called.

I've created pull request: https://github.com/django/django/pull/6568

--

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

Django

unread,
May 7, 2016, 6:53:29 AM5/7/16
to django-...@googlegroups.com
#26595: w.save() is called after w = r.waiter_set.create(name='Joe') in one-to-one
relationship
-------------------------------+--------------------------------------
Reporter: shiblystory | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed
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 Tim Graham <timograham@…>):

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


Comment:

In [changeset:"6ae617dc57149216d264d3596cdb10a72dad1bca" 6ae617dc]:
{{{
#!CommitTicketReference repository=""
revision="6ae617dc57149216d264d3596cdb10a72dad1bca"
Fixed #26595 -- Removed unnecessary save() in one_to_one.txt example.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26595#comment:2>

Django

unread,
May 7, 2016, 6:53:50 AM5/7/16
to django-...@googlegroups.com
#26595: w.save() is called after w = r.waiter_set.create(name='Joe') in one-to-one
relationship
-------------------------------+--------------------------------------
Reporter: shiblystory | Owner: nobody
Type: Uncategorized | Status: closed
Component: Documentation | Version: 1.9
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"219fc1f726d72d96f9db6bdfb6a2979398cfd98e" 219fc1f]:
{{{
#!CommitTicketReference repository=""
revision="219fc1f726d72d96f9db6bdfb6a2979398cfd98e"
[1.9.x] Fixed #26595 -- Removed unnecessary save() in one_to_one.txt
example.

Backport of 6ae617dc57149216d264d3596cdb10a72dad1bca from master
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26595#comment:3>

Reply all
Reply to author
Forward
0 new messages