This commit is contained in:
Alexis Lahouze 2017-05-07 22:23:47 +02:00
parent 0d61377280
commit b1d7e04a26

View File

@ -149,7 +149,7 @@ class Operation(db.Model):
@classmethod
def get_categories_for_range(cls, account, begin, end):
"""Get category list for a specific time period."""
if isinstance(account, int) or isinstance(account, str):
if isinstance(account, (int, str)):
account_id = account
else:
account_id = account.id
@ -182,7 +182,7 @@ class Operation(db.Model):
@classmethod
def get_ohlc_per_day_for_range(cls, account, begin=None, end=None):
"""Get Opening, High, Low, Closing per day for a specific range"""
if isinstance(account, int) or isinstance(account, str):
if isinstance(account, (int, str)):
account_id = account
else:
account_id = account.id