#25040: #get_related_models_recursive cannot digest a Model with a GenericFK
-------------------------------------+-------------------------------------
     Reporter:  kairichard           |                    Owner:  nobody
         Type:  Uncategorized        |                   Status:  new
    Component:  Migrations           |                  Version:  1.8
     Severity:  Normal               |               Resolution:
     Keywords:  migrations generic   |             Triage Stage:
  fk                                 |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  1                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by kairichard):

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


Old description:

> Example:
> {{{
> from django.db import models
> from django.contrib.contenttypes import generic
> from django.db.migrations.state import get_related_models_recursive
>
> class BaseModel(models.Model):
>     current_state = generic.GenericForeignKey()
>
> get_related_models_recursive(BaseModel) # Exception!
> }}}

New description:

 Example models.py:
 {{{
 from django.db import models
 from django.contrib.contenttypes import generic
 from django.db.migrations.state import get_related_models_recursive

 class BaseModel(models.Model):
     current_state = generic.GenericForeignKey()

 get_related_models_recursive(BaseModel) # Exception!
 }}}

--

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

Reply via email to