#25241: ModelForm.save() gives wrong message when saving invalid form with
UUIDField pk
---------------------------+-------------------------------------
     Reporter:  timgraham  |                    Owner:  timgraham
         Type:  Bug        |                   Status:  new
    Component:  Forms      |                  Version:  master
     Severity:  Normal     |               Resolution:
     Keywords:             |             Triage Stage:  Accepted
    Has patch:  1          |      Needs documentation:  0
  Needs tests:  0          |  Patch needs improvement:  0
Easy pickings:  0          |                    UI/UX:  0
---------------------------+-------------------------------------
Changes (by timgraham):

 * has_patch:  0 => 1


Old description:

> self.
>
> `save()`
> [https://github.com/django/django/blob/3e1bb5cfb8f9676e0c045f0d101a094437133b54/django/forms/models.py#L457
> checks] `self.instance.pk is None` which is the incorrect condition in
> the case of a model with a `UUIDField` primary key.

New description:

 `save()`
 
[https://github.com/django/django/blob/3e1bb5cfb8f9676e0c045f0d101a094437133b54/django/forms/models.py#L457
 checks] `self.instance.pk is None` which is the incorrect condition in the
 case of a model with a `UUIDField` primary key.

--

Comment:

 [https://github.com/django/django/pull/5111 PR]

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.b8d165a237601819e03483e17d98499d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to