From 0e95ca7b69148525cedd91c99dfaa81fc3d68332 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 1 Feb 2022 14:10:25 -0500 Subject: [PATCH] Fix ProgrammingError exception when annotating config context data --- netbox/extras/querysets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/extras/querysets.py b/netbox/extras/querysets.py index 982f33d02..21727d3d4 100644 --- a/netbox/extras/querysets.py +++ b/netbox/extras/querysets.py @@ -82,7 +82,7 @@ class ConfigContextModelQuerySet(RestrictedQuerySet): self._get_config_context_filters() ).annotate( _data=EmptyGroupByJSONBAgg('data', ordering=['weight', 'name']) - ).values("_data") + ).values("_data").order_by() ) ).distinct()