From b1d7e04a26e2fb67ad2e5e873a782e299c31aee2 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 7 May 2017 22:23:47 +0200 Subject: [PATCH] Linting. --- accountant/models/operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/accountant/models/operations.py b/accountant/models/operations.py index 07326fc..e85ae92 100644 --- a/accountant/models/operations.py +++ b/accountant/models/operations.py @@ -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