From a84201305d645b72e07a9a8f7361d86a0232254e Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Mon, 15 Jul 2019 04:52:55 +0100 Subject: [PATCH] Group by the right thing this time --- lib/Pear/LocalLoop/Controller/Api/External.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Pear/LocalLoop/Controller/Api/External.pm b/lib/Pear/LocalLoop/Controller/Api/External.pm index 4a2ee0e..6f8b5c1 100644 --- a/lib/Pear/LocalLoop/Controller/Api/External.pm +++ b/lib/Pear/LocalLoop/Controller/Api/External.pm @@ -323,7 +323,7 @@ sub post_supplier_history { total_spend => { sum => 'sales.value' }, } ], - group_by => [ 'me.id', 'organisation.name' ], + group_by => [ 'me.id', 'organisation.id' ], order_by => { '-asc' => 'organisation.name' }, } );