Skip to content

Type hints in model fields prevents proper operation #25

Description

@jsabater

VS Code version

VSCodium 1.126.04524

OS

Ubuntu 24.04 (Tuxedo OS)

Steps to reproduce

  1. Open Django 6 project with Django Ninja 1.6.2.
  2. Visit the Django ORM Lens. It renders the tree and the preview works correctly.
  3. Add a type hint to the first field of the first model in a file.
  4. Save the change. The field disappears from the tree.
  5. Open the graphical preview, the field is not there.
  6. Keep doing that to other fields, the entity ends up empty in the preview and the tree.

Sample models.py (minimized)

class RevokedToken(models.Model):
    """A revoked JWT, keyed by its ``jti`` claim (the token denylist)."""

    jti: CharField[str] = models.CharField(max_length=32, unique=True)
    ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions