WIP: attempt to fix issue with get_df (column names)

Cleanup & cosmetic
This commit is contained in:
phil 2024-03-03 23:50:48 +05:30
parent bcfda603be
commit d2c2e6cc69
4 changed files with 52 additions and 22 deletions

View file

@ -8,8 +8,7 @@ from typing import Annotated
from asyncio import CancelledError
from fastapi import (Depends, APIRouter, HTTPException, Response, Header,
WebSocket, WebSocketDisconnect,
status, responses)
WebSocket, WebSocketDisconnect, status)
from gisaf.models.authentication import User
from gisaf.redis_tools import store as redis_store

View file

@ -92,7 +92,10 @@ async def get_base_style(request: Request, name: str,
async def get_layer_style(request: Request, store: str,
response: Response,
) -> MaplibreStyle | None:
store_record = registry.stores.loc[store]
try:
store_record = registry.stores.loc[store]
except KeyError:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND)
if store_record.is_live:
## No ttag for live layers' style (could be added?)
## Get layer_defs from live redis and give symbol