Skip to content

Commit 5807b53

Browse files
author
Sean Sullivan
committed
fix failing pytest
1 parent ec6824c commit 5807b53

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

elastic_datashader/elastic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def get_search_base(
206206
base_s = base_s.filter("range", **time_range)
207207

208208
#filter the ellipse search range in the data base query so the legen matches the tiles
209-
if params['render_mode'] =="ellipses":
209+
if params.get('render_mode',"") =="ellipses":
210210
units = convert_nm_to_ellipse_units(params['search_nautical_miles'],params['ellipse_units'])
211211
search_range = {params["ellipse_major"]:{"lte":units}}
212212
base_s = base_s.filter("range",**search_range)

elastic_datashader/routers/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def provide_legend(idx: str, field_name: str, request: Request): # pylint
137137
"lon": min(180.0, extent["maxLon"]),
138138
},
139139
}
140-
if params['render_mode'] == "ellipses":
140+
if params.get('render_mode',"") == "ellipses":
141141
#expand the bbox by half the search_nautical_miles or we cut off items on the edge
142142
#this still isn't 100% accurate because the tiles are squares and our viewport is rectangular
143143
#you can sometimes see a little tiny part of the ellipse and it isn't counted

0 commit comments

Comments
 (0)