Skip to content

serializers.PrimaryKeyRelatedField() field does not play nicely with the type generator #64

@HasanMajid

Description

@HasanMajid

when I have a field in a serializer like this:

preferred_language = serializers.PrimaryKeyRelatedField(
        queryset=Language.objects.all(), required=False
    )

and I try to run migrations, it gives me an error like this: django.db.utils.OperationalError: no such table: account_language.
I guess it tries to generate the type before it can run the migrations properly. It only works once I remove the ts_interface() tag from the serializer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions