Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Weird behaviour using different variable names in select and filter function #203
PonyORM raised an exception that didn't make any sense to me. After some hours of trying I found a solution for it, but I think it is a bug because imho the code should work.
This code leads to the following exception.
If I use the same variable name in the select statement and for the lambdas it works as expected.
# New features * New warning DatabaseContainsIncorrectEmptyValue added, it is raised when the required attribute is empty during loading an entity from the database # Bugfixes * Fixes #216: Added Python 3.6 support * Fixes #203: subtranslator should use argnames from parent translator * Change a way aliases in SQL query are generated in order to fix a problem when a subquery alias masks a base query alias * Volatile attribute bug fixed * Fix creation of self-referenced foreign keys - before this Pony didn't create the foreign key for self-referenced attributes * Bug fixed: when required attribute is empty the loading from the database shouldn't raise the validation error. Now Pony raises the warning DatabaseContainsIncorrectEmptyValue * Throw an error with more clear explanation when a list comprehension is used inside a query instead of a generator expression: "Use generator expression (... for ... in ...) instead of list comprehension [... for ... in ...] inside query"