Skip to content

KeyError on delete #321

Closed
Closed
@lukashambsch

Description

@lukashambsch

When trying to delete an item from the database, I am receiving a KeyError. This is part of the stack trace:

File "<string>", line 2, in delete
File "/home/ec2-user/.env/src/pony/pony/utils/utils.py", line 81, in cut_traceback
  return func(*args, **kwargs)
File "/home/ec2-user/.env/src/pony/pony/orm/core.py", line 4539, in delete
  obj._delete_()
File "/home/ec2-user/.env/src/pony/pony/orm/core.py", line 4506, in _delete_
  obj2 = cache_index.pop(vals)
KeyError: (Order[100330699], 'AD-UNI-SMPGRP-08')

It seems the KeyError is sending me values that are part of the composite_key. Why would this be a key error on a delete?

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions