Эх сурвалжийг харах

Unbreak the caches endpoint

Kirk Trombley 4 жил өмнө
parent
commit
0e6f3c3909

+ 3 - 0
server/app/point_gen/shared.py

@@ -112,6 +112,9 @@ class GeoPointSourceGroup:
     def __init__(self, sources: Dict[str, GeoPointSource], default: GeoPointSource):
         self.sources = sources
         self.default = default
+        self.cached = [s for s in sources.values() if isinstance(s, CachedGeoPointSource)]
+        if isinstance(default, CachedGeoPointSource):
+            self.cached.append(default)
 
     def restock(self, key: Union[str, None] = None):
         """