Add QuerySetEmptyError

This commit is contained in:
tcely
2025-08-11 11:40:23 -04:00
committed by GitHub
parent dbc15ffa11
commit e93abfc6f2

View File

@@ -60,3 +60,11 @@ class FormatUnavailableError(Exception):
self.format = format
super().__init__(*args, **kwargs)
class QuerySetEmptyError(Exception):
# Raised when a primary key was missing when iterating a query set.
def __init__(self, *args, exc=None, key=None, **kwargs):
self.exc = exc
self.key = key
super().__init__(*args, **kwargs)