#34877: KeyError for output_field in GeneratedField
-------------------------------------+-------------------------------------
     Reporter:  Paolo Melchiorre     |                    Owner:  nobody
         Type:  Bug                  |                   Status:  new
    Component:  Database layer       |                  Version:  5.0
  (models, ORM)                      |
     Severity:  Release blocker      |               Resolution:
     Keywords:  field, database,     |             Triage Stage:  Accepted
  generated, output_field            |
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Simon Charette):

 * stage:  Unreviewed => Accepted


Comment:

 Seems like we missed a `db_type_parameters` override

 {{{#!diff
 diff --git a/django/db/models/fields/generated.py
 b/django/db/models/fields/generated.py
 index deb5875638..5fbd4c4fdd 100644
 --- a/django/db/models/fields/generated.py
 +++ b/django/db/models/fields/generated.py
 @@ -161,3 +161,6 @@ def get_internal_type(self):

      def db_parameters(self, connection):
          return self.output_field.db_parameters(connection)
 +
 +    def db_type_parameters(self, connection):
 +        return self.output_field.db_type_parameters(connection)
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34877#comment:2>
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 on the web visit 
https://groups.google.com/d/msgid/django-updates/0107018ad819b097-bcdf6adb-9cb0-4bf8-a255-8770aa60f19a-000000%40eu-central-1.amazonses.com.

Reply via email to