Simplify schema and error handling
This commit is contained in:
@@ -5,7 +5,6 @@ from django.db import models
|
||||
|
||||
from core.exchanges.alpaca import AlpacaExchange
|
||||
from core.exchanges.oanda import OANDAExchange
|
||||
from core.lib import trades
|
||||
from core.lib.customers import get_or_create, update_customer_fields
|
||||
from core.util import logs
|
||||
|
||||
@@ -100,7 +99,7 @@ class Account(models.Model):
|
||||
if self.exchange in EXCHANGE_MAP:
|
||||
return EXCHANGE_MAP[self.exchange](self)
|
||||
else:
|
||||
raise Exception("Exchange not supported")
|
||||
raise Exception(f"Exchange not supported : {self.exchange}")
|
||||
|
||||
@property
|
||||
def client(self):
|
||||
|
||||
Reference in New Issue
Block a user