From af0ca059da29391db9b1dfca0fe96883ce95f72f Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Tue, 15 Sep 2020 23:43:09 +0300 Subject: Remove unnecessary if branch * wqflask/utility/authentication_tools.py (check_resource_availability): Combine if statements into one boolean check in one if branch. --- wqflask/utility/authentication_tools.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'wqflask') diff --git a/wqflask/utility/authentication_tools.py b/wqflask/utility/authentication_tools.py index 3553b92b..954f55fc 100644 --- a/wqflask/utility/authentication_tools.py +++ b/wqflask/utility/authentication_tools.py @@ -17,9 +17,7 @@ logger = logging.getLogger(__name__ ) def check_resource_availability(dataset, trait_id=None): #At least for now assume temporary entered traits are accessible - if type(dataset) == str: - return webqtlConfig.DEFAULT_PRIVILEGES - if dataset.type == "Temp": + if type(dataset) == str or dataset.type == "Temp": return webqtlConfig.DEFAULT_PRIVILEGES resource_id = get_resource_id(dataset, trait_id) -- cgit v1.2.3