Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

orm.json not supported #5

Closed
fluffy-critter opened this issue Apr 17, 2022 · 1 comment
Closed

orm.json not supported #5

fluffy-critter opened this issue Apr 17, 2022 · 1 comment

Comments

@fluffy-critter
Copy link

I have a model class like:

class User(orm.core.Entity):
    name = orm.PrimaryKey(str)
    profile = orm.Required(orm.json)

When I attempt to make use of this field, mypy fails to see orm.json as being equivalent to a dict, so I can neither call user.profile.copy() nor can I return user.profile as a dict directly.

@fluffy-critter
Copy link
Author

Wait, right, orm.json could be something that isn't a dict. Never mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant