aboutsummaryrefslogtreecommitdiff
path: root/wqflask/utility
diff options
context:
space:
mode:
authorBonfaceKilz2020-09-15 23:43:09 +0300
committerBonfaceKilz2020-09-16 00:13:16 +0300
commitaf0ca059da29391db9b1dfca0fe96883ce95f72f (patch)
tree48b22b9808091e9172760a021cf9f19dd8fd6eb8 /wqflask/utility
parent6e776e94bdc2cea9923d70ff836ce1c02a1e1af9 (diff)
downloadgenenetwork2-af0ca059da29391db9b1dfca0fe96883ce95f72f.tar.gz
Remove unnecessary if branch
* wqflask/utility/authentication_tools.py (check_resource_availability): Combine if statements into one boolean check in one if branch.
Diffstat (limited to 'wqflask/utility')
-rw-r--r--wqflask/utility/authentication_tools.py4
1 files changed, 1 insertions, 3 deletions
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)