mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Convert relation to array to be able to use sum
This commit is contained in:
@@ -6,7 +6,7 @@ module OpenFoodNetwork
|
||||
end
|
||||
|
||||
def balance
|
||||
-completed_orders.sum(&:outstanding_balance)
|
||||
-completed_orders.to_a.sum(&:outstanding_balance)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user