From afe3efb319cd1a55636d0e76c03e14dcdd6680e1 Mon Sep 17 00:00:00 2001 From: Mark Veidemanis Date: Mon, 13 Mar 2023 18:53:00 +0000 Subject: [PATCH] Use the new model helpers --- core/models.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/models.py b/core/models.py index 3559858..b697991 100644 --- a/core/models.py +++ b/core/models.py @@ -117,7 +117,8 @@ class Aggregator(models.Model): @classmethod def get_currencies_for_platform(cls, platform): - aggregators = Aggregator.get_for_platform(platform) + # aggregators = Aggregator.get_for_platform(platform) + aggregators = platform.aggregators currencies = set() for aggregator in aggregators: for currency in aggregator.currencies: @@ -127,7 +128,8 @@ class Aggregator(models.Model): @classmethod def get_account_info_for_platform(cls, platform): - aggregators = Aggregator.get_for_platform(platform) + # aggregators = Aggregator.get_for_platform(platform) + aggregators = platform.aggregators account_info = {} for agg in aggregators: for bank, accounts in agg.account_info.items():