Browse Source

Unbreak the caches endpoint

Kirk Trombley 4 năm trước cách đây
mục cha
commit
0e6f3c3909
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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):
         """