diff options
author | David Robertson <davidr@element.io> | 2023-08-24 15:53:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-24 14:53:07 +0000 |
commit | e691243e191d9dad2bcbf55f9659d007f75fd28e (patch) | |
tree | 91db17d2145140077779b4532094b6a464479ba3 /synapse/util/caches | |
parent | Add `Retry-After` to M_LIMIT_EXCEEDED error responses (#16136) (diff) | |
download | synapse-e691243e191d9dad2bcbf55f9659d007f75fd28e.tar.xz |
Fix typechecking with twisted trunk (#16121)
Diffstat (limited to 'synapse/util/caches')
-rw-r--r-- | synapse/util/caches/deferred_cache.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/caches/deferred_cache.py b/synapse/util/caches/deferred_cache.py index bf7bd351e0..029eedcc6f 100644 --- a/synapse/util/caches/deferred_cache.py +++ b/synapse/util/caches/deferred_cache.py @@ -470,7 +470,7 @@ class CacheMultipleEntries(CacheEntry[KT, VT]): def deferred(self, key: KT) -> "defer.Deferred[VT]": if not self._deferred: self._deferred = ObservableDeferred(defer.Deferred(), consumeErrors=True) - return self._deferred.observe().addCallback(lambda res: res.get(key)) + return self._deferred.observe().addCallback(lambda res: res[key]) def add_invalidation_callback( self, key: KT, callback: Optional[Callable[[], None]] |