Use the new model helpers

This commit is contained in:
Mark Veidemanis 2023-03-13 18:53:00 +00:00
parent 7d1bd75f48
commit afe3efb319
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
1 changed files with 4 additions and 2 deletions

View File

@ -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():