From 86d52e7bbced5c6ef9ec984d410499dfaee3ea7e 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' }, } );