Skip to content
Discussion options

You must be logged in to vote

You have circular references and to resolve it you need to rebuild your models.

Add the following to __init__.py:

from heroes.models import HeroPublicWithTeam, HeroPublic
from teams.models import TeamPublicWithHeroes, TeamPublic

HeroPublicWithTeam.model_rebuild()
TeamPublicWithHeroes.model_rebuild()

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@dnszero
Comment options

@dnszero
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by YuriiMotov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
4 participants