Skip to content

Type issues with Autoserializer and FK #68

@metaforx

Description

@metaforx

The type definition returns an integer instead of a string for the PageField.

This results in type validation errors in the frontend.

Reproduce:

#models.py
link = PageField(blank=True, null=True)

Type definitions from
http://localhost:8080/api/plugins/

  "link": {
      "type": "integer"
  }

Placeholder Content from
http://localhost:8080/api/en/placeholders/5/82/content/

{
    "link": "http://localhost:8080/api/en/pages/unterseite/"
}

It correctly returns a string when used as a plugin. However, it is incorrectly returned as an integer in the type definition. This is likely because it is a foreign key field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions