From bdb4a46c1a36bca5ea6b3a659d276463f64e5bba Mon Sep 17 00:00:00 2001 From: Lars Noack Date: Thu, 11 Apr 2024 16:53:20 +0200 Subject: [PATCH] fix: minor collection fixes --- music_kraken/objects/collection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/music_kraken/objects/collection.py b/music_kraken/objects/collection.py index d2bf515..5e078fb 100644 --- a/music_kraken/objects/collection.py +++ b/music_kraken/objects/collection.py @@ -193,7 +193,7 @@ class Collection(Generic[T]): def _find_object_in_self(self, __object: T) -> Optional[T]: for name, value in __object.indexing_values: - if value is None: + if value is None or value == __object._default_factories.get(name, lambda: None)(): continue if value in self._indexed_values[name]: return self._indexed_to_objects[value][0]