We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The original pypika has the bug kayak/pypika#560 which was fixed in kayak/pypika#576. pypika-tortoise has the same bug.
pypika
pypika-tortoise
import asyncio from tortoise import fields, Tortoise, Model from enum import Enum class MyModel(Model): name = fields.TextField() class MyEnum(str, Enum): A = "a" async def do(): await Tortoise.init(db_url="sqlite://:memory:", modules={"models": ["__main__"]}) qs = MyModel.filter(name=MyEnum.A) qs._make_query() print(qs.query) # expected SELECT "id","name" FROM "mymodel" WHERE "name"='a' # actual SELECT "id","name" FROM "mymodel" WHERE "name"=a asyncio.run(do())
The text was updated successfully, but these errors were encountered:
Thanks for report! Could you make a PR?
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
The original
pypika
has the bug kayak/pypika#560 which was fixed in kayak/pypika#576.pypika-tortoise
has the same bug.The text was updated successfully, but these errors were encountered: