From ea73aa153d8b266096e37be3c87f3d0b045f31a5 Mon Sep 17 00:00:00 2001 From: Jimmy Zelinskie Date: Thu, 19 Jan 2017 13:45:07 -0500 Subject: [PATCH] pgsql: searchNotificationLayerIntroducingVulnerability order by layer ID This fixes a bug where the API was returning Notification pages ordered by LDFV.ID instead of by Layer ID. --- database/pgsql/queries.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/pgsql/queries.go b/database/pgsql/queries.go index 49ccd014..a5a5ed0f 100644 --- a/database/pgsql/queries.go +++ b/database/pgsql/queries.go @@ -219,7 +219,7 @@ const ( AND vafv.featureversion_id = fv.id AND ldfv.featureversion_id = fv.id AND ldfv.modification = 'add' - ORDER BY ldfv.ID + ORDER BY ldfv.layer_id ) SELECT l.id, l.name FROM LDFV, Layer l