-
-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
Transaction only considers the objects in pg, it doesn't consider those objects are not stored in pg yet (they are in txn.deleted/added dict). It would be great if this kind of cases are contemplated:
async def test_txn_add_and_delete(container_requester):
async with container_requester as requester:
async with transaction(db=requester.db) as txn:
root = await txn.get(ROOT_ID)
container = await root.async_get("guillotina")
await create_content_in_container(
container, "Item", "foobar", check_security=False, __uuid__="foobar"
)
await container.async_del("foobar")
obj = await container.async_get("foobar") # should be deleted at this point
assert obj is None
async with transaction(db=requester.db) as txn:
obj = await container.async_get("foobar")
# object still exists
assert obj is NoneAnother case: #1053
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels