#28043: Cloning a ModelState fails to deepcopy all options
-------------------------------------+-------------------------------------
               Reporter:  Ian Foote  |          Owner:  nobody
                   Type:  Bug        |         Status:  new
              Component:             |        Version:  master
  Migrations                         |
               Severity:  Release    |       Keywords:  ModelState clone
  blocker                            |  indexes
           Triage Stage:             |      Has patch:  0
  Unreviewed                         |
    Needs documentation:  0          |    Needs tests:  0
Patch needs improvement:  0          |  Easy pickings:  0
                  UI/UX:  0          |
-------------------------------------+-------------------------------------
 In
 
[https://github.com/django/django/blob/351835f26234cade43f0bed45441fc144c33a785/django/db/migrations/state.py#L548
 ModelState.clone], we copy the {{{self.options}}} dictionary, but this
 fails to copy any mutable values, specifically {{{indexes}}}. Since
 {{{AddIndex.state_forwards}}} mutates {{{indexes}}}, this leads to an
 invalid state.

--
Ticket URL: <https://code.djangoproject.com/ticket/28043>
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/052.184cc44179a8da239f2190cbda4b77ba%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to