#36952: Fix alter_field when called on a field that not has attribute: concrete
-------------------------------------+-------------------------------------
     Reporter:  Junior Andrade       |                    Owner:  (none)
         Type:  Bug                  |                   Status:  closed
    Component:  Database layer       |                  Version:  6.0
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  needsinfo
     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 Junior Andrade):

 Understood. Thanks for your review. Replying to [comment:2 Simon
 Charette]:
 > `Field.concrete` is set at `Field.set_attributes_from_name`
 
[https://github.com/django/django/blob/4aefc9ea51cc2d78f43b1dc2aa69732e55d18a56/django/db/models/fields/__init__.py#L940
 time] which should be systematically called before passing objects to the
 schema editor.
 >
 > If there is a core code path that doesn't do so that's likely where the
 bug lies and not in the schema editor itself.
 >
 > Given you haven't provided any way to reproduce the problem that
 demonstrate Django is at fault I'll close the ticket and the associated PR
 for now.
 >
 > Please re-open if you can provide a clear example where Django calls
 `alter_field` with a `Field` instance that hasn't been prepared with a
 prior `set_attributes_from_name` call.
-- 
Ticket URL: <https://code.djangoproject.com/ticket/36952#comment:5>
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 view this discussion visit 
https://groups.google.com/d/msgid/django-updates/0107019c9c02bbb4-064358a1-1b65-4996-b12a-c8efaf18c8b2-000000%40eu-central-1.amazonses.com.

Reply via email to