Skip to content

Child can't Many To Many Parent #535

@AstraLuma

Description

@AstraLuma
class Parent(PolymorphicModel):
    ...

class Child(Parent):
    spam = models.ManyToManyField(Parent)
$ ./manage.py makemigrations
SystemCheckError: System check identified some issues:

ERRORS:
myapp.Child.spam: (fields.E305) Reverse query name for 'myapp.Child.spam' clashes with reverse query name for 'myapp.Child.parent_ptr'.
	HINT: Add or change a related_name argument to the definition for 'myapp.Child.spam' or 'myapp.Child.parent_ptr'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions