Skip to content

Commit 51ca9a8

Browse files
authored
fix: set supported_colormaps for colormapfactory (#466)
### Issue #458 (comment) ### What?/ Why? - `colorMaps` endpoint was returning the new colormaps but `colorMaps/colorMapId` wasn't. ### Testing? https://jtran.delta-backend.com/api/raster/docs#/ColorMaps/getColorMap <img width="1682" alt="Screenshot 2025-03-10 at 2 59 35 PM" src="https://github.com/user-attachments/assets/54f9faeb-5322-4431-9070-e436c56dc41b" />
2 parents bfa9b6f + c1bffde commit 51ca9a8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

raster_api/runtime/src/app.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,8 @@ async def lifespan(app: FastAPI):
205205
###############################################################################
206206
# Colormaps endpoints
207207
###############################################################################
208-
cmaps = ColorMapFactory()
209208
# Set supported colormaps to be the modified cmap list with added colormaps
210-
cmaps.supported_colormaps = cmap
209+
cmaps = ColorMapFactory(supported_colormaps=cmap)
211210
app.include_router(cmaps.router, tags=["ColorMaps"])
212211

213212

0 commit comments

Comments
 (0)