You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ python ponyfail.py
GET CONNECTION FROM THE LOCAL POOL
BEGIN IMMEDIATE TRANSACTION
INSERT INTO "TestPost" ("title") VALUES (?)
['']
COMMIT
RELEASE CONNECTION
GET CONNECTION FROM THE LOCAL POOL
SWITCH TO AUTOCOMMIT MODE
SELECT "tp"."id", "tp"."title"
FROM "TestPost" "tp"
ORDER BY 1
LIMIT 1
ROLLBACK
RELEASE CONNECTION
Traceback (most recent call last):
...
File "/usr/lib/python3.5/site-packages/pony/orm/core.py", line 2186, in validate
if obj is None: throw(ValueError, 'Attribute %s is required' % attr)
File "/usr/lib/python3.5/site-packages/pony/utils.py", line 103, in throw
raise exc
ValueError: Attribute TestPost.title is required
The text was updated successfully, but these errors were encountered:
kozlovsky
changed the title
Autostripped string is not validated before insert/update
Autostripped strings are not validated correctly for Required attributes
Apr 4, 2016
# Improvements
* Fixes#172: Query prefetch() method should load specified lazy attributes right in the main query if possible
# Bugfixes
* Fixes#168: Incorrect caching when slicing the same query multiple times
* Fixes#169: When py_check() returns False, Pony should truncate too large values in resulting ValueError message
* Fixes#171: AssertionError when saving changes of multiple objects
* Fixes#176: Autostripped strings are not validated correctly for Required attributes
See blog post for more detailed information: https://blog.ponyorm.com/2016/04/04/pony-orm-release-0-6-5/
The text was updated successfully, but these errors were encountered: