소스 검색

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