fix: clean mapping

This commit is contained in:
Hazel 2024-04-17 17:56:16 +02:00
parent cde3b3dbbb
commit 56101d4a31

View File

@ -46,7 +46,7 @@ class Collection(Generic[T]):
def _map_element(self, __object: T, from_map: bool = False): def _map_element(self, __object: T, from_map: bool = False):
self._contains_ids.add(__object.id) self._contains_ids.add(__object.id)
for name, value in __object.indexing_values: for name, value in (*__object.indexing_values, ('id', __object.id)):
if value is None or value == __object._inner._default_values.get(name): if value is None or value == __object._inner._default_values.get(name):
continue continue