perf: dont override doc.extend (#32890)

This commit is contained in:
Sagar Vora 2025-06-11 07:26:46 +00:00 committed by GitHub
parent d35c1d958f
commit a6b2f7c991
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1988,15 +1988,9 @@ class LazyDocument:
getattr(self, key, None)
return super().get(key, filters, limit, default)
@override
def extend(self: Document, key, value):
# Ensure that table descriptor is triggered at least once
if isinstance(key, str) and key in self._table_fieldnames:
getattr(self, key, None)
return super().extend(key, value)
@override
def append(self, key: str, value: D | dict | None = None, position: int = -1) -> D:
# Ensure that table descriptor is triggered at least once
if isinstance(key, str) and key in self._table_fieldnames:
getattr(self, key, None)
return super().append(key, value, position)