diff --git a/src/common/pg_impl.py b/src/common/pg_impl.py index 84c8a2b..88c9eda 100644 --- a/src/common/pg_impl.py +++ b/src/common/pg_impl.py @@ -290,7 +290,7 @@ def get_station_data(self, **kwargs) -> str: # get nowcast data_source from forecast data_source # check if data_source is tropical - if kwargs['forcing_metaclass'] == 'tropical': + if kwargs['forcing_metclass'] == 'tropical': # if tropical split data source and replace second value (OFCL) with NOWCAST source_parts = kwargs['data_source'].split('_') source_parts[1] = 'NOWCAST' diff --git a/src/server.py b/src/server.py index b634add..cda48b3 100644 --- a/src/server.py +++ b/src/server.py @@ -398,7 +398,7 @@ async def get_terria_map_catalog_data_file(file_name: Union[str, None] = Query(d @APP.get('/get_station_data', status_code=200, response_model=None, response_class=PlainTextResponse) def get_station_data(station_name: Union[str, None] = Query(default=None), time_mark: Union[str, None] = Query(default=None), data_source: Union[str, None] = Query(default=None), instance_name: Union[str, None] = Query(default=None), - forcing_metaclass: Union[str, None] = Query(default=None)) -> PlainTextResponse: + forcing_metclass: Union[str, None] = Query(default=None)) -> PlainTextResponse: """ Returns the CSV formatted observational station. @@ -413,12 +413,12 @@ def get_station_data(station_name: Union[str, None] = Query(default=None), time_ # example input - station name: 8651370, timemark: 2023-08-24T00:00:00, data_source: GFSFORECAST_WNAT_53K_V1.0 try: # validate the input. nothing is optional - if station_name or time_mark or data_source or instance_name or forcing_metaclass: + if station_name or time_mark or data_source or instance_name or forcing_metclass: # init the kwargs variable kwargs: dict = {} # create the param list - params: list = ['station_name', 'time_mark', 'data_source', 'instance_name', 'forcing_metaclass'] + params: list = ['station_name', 'time_mark', 'data_source', 'instance_name', 'forcing_metclass'] # loop through the SP params passed in for param in params: