{"action":"opened","issue":{"url":"https://api.github.com/repos/ponyorm/pony/issues/138","labels_url":"https://api.github.com/repos/ponyorm/pony/issues/138/labels{/name}","comments_url":"https://api.github.com/repos/ponyorm/pony/issues/138/comments","events_url":"https://api.github.com/repos/ponyorm/pony/issues/138/events","html_url":"https://github.com/ponyorm/pony/issues/138","id":97406361,"number":138,"title":"Assertion failed after exception","user":{"login":"socketpair","id":1157412,"avatar_url":"https://avatars.githubusercontent.com/u/1157412?v=3","gravatar_id":"","url":"https://api.github.com/users/socketpair","html_url":"https://github.com/socketpair","followers_url":"https://api.github.com/users/socketpair/followers","following_url":"https://api.github.com/users/socketpair/following{/other_user}","gists_url":"https://api.github.com/users/socketpair/gists{/gist_id}","starred_url":"https://api.github.com/users/socketpair/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socketpair/subscriptions","organizations_url":"https://api.github.com/users/socketpair/orgs","repos_url":"https://api.github.com/users/socketpair/repos","events_url":"https://api.github.com/users/socketpair/events{/privacy}","received_events_url":"https://api.github.com/users/socketpair/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-27T07:58:09Z","updated_at":"2015-07-27T07:58:09Z","closed_at":null,"body":"```\r\nfrom pony.orm import *\r\ndb = Database('sqlite', ':memory:', create_db=True)\r\nclass Person(db.Entity):\r\n    name = Required(str, unique=True)\r\ndb.generate_mapping(create_tables=True)\r\nwith db_session:\r\n    Person(name='a1')\r\nwith db_session:\r\n    Person(name='a0')\r\n    try:\r\n        p = Person(name='a1')\r\n        p.flush()\r\n    except:\r\n        p.delete()\r\n```\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"./zzz.py\", line 35, in <module>\r\n    p.delete()\r\n  File \"<auto generated wrapper of delete() function>\", line 2, in delete\r\n  File \"/home/mmarkk/.local/lib/python2.7/site-packages/pony/utils.py\", line 88, in cut_traceback\r\n    return func(*args, **kwargs)\r\n  File \"/home/mmarkk/.local/lib/python2.7/site-packages/pony/orm/core.py\", line 3866, in delete\r\n    obj._delete_()\r\n  File \"/home/mmarkk/.local/lib/python2.7/site-packages/pony/orm/core.py\", line 3838, in _delete_\r\n    assert save_pos is not None\r\nAssertionError\r\n```"}}