We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 26ddf2e commit 56b7cdfCopy full SHA for 56b7cdf
1 file changed
django_mapengine/views.py
@@ -78,7 +78,7 @@ def get_context_data(self, **kwargs) -> dict:
78
model_field = MapLayerModel._meta.get_field("choropleth_field")
79
except FieldDoesNotExist:
80
raise LookupError("Your MapLayerModel has no field named 'choropleth_field', which is mandatory.")
81
- choropleths = MapLayerModel.objects.filter(choropleth_field__isnull=False).values_list(
+ choropleths = MapLayerModel.objects.exclude(choropleth_field="").filter(choropleth_field__isnull=False).values_list(
82
"identifier", "geom_layer", "choropleth_unit", "name")
83
store["choropleths"] = {
84
item[0]: {
0 commit comments