瀏覽代碼

Unbreak the caches endpoint

Kirk Trombley 4 年之前
父節點
當前提交
0e6f3c3909
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      server/app/point_gen/shared.py

+ 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):
         """