diff --git a/scipost_django/graphs/graphs/plotkind.py b/scipost_django/graphs/graphs/plotkind.py index 6910348184cf189bc99faa904992d88cac33e974..d90c37b84cf37be06a516a30c9a294e10ac314f7 100644 --- a/scipost_django/graphs/graphs/plotkind.py +++ b/scipost_django/graphs/graphs/plotkind.py @@ -442,7 +442,7 @@ class BarPlot(PlotKind): self.plotter.get_queryset() .values(group_key) .annotate(agg=agg_func) - .exclude(Q(**{group_key: None}) | Q(agg=None)) + .exclude(**{group_key: None}) ) if (order_by := self.options.get("order_by")) and (