From 549726ec3c4c176f855b65ade299701d1865b261 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Mon, 3 Aug 2020 17:11:06 +0300 Subject: Remove "+" when concatenating strings * wqflask/wqflask/api/gen_menu.py (build_types, build_datasets): Replace '+' when joining strings inside brackets --- wqflask/wqflask/api/gen_menu.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index 45814ed9..cc11e14b 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -113,13 +113,13 @@ def build_types(species, group): """ - query = ("SELECT DISTINCT Tissue.Name " + - "FROM ProbeFreeze, ProbeSetFreeze, InbredSet, " + - "Tissue, Species WHERE Species.Name = '{0}' " + - "AND Species.Id = InbredSet.SpeciesId AND " + - "InbredSet.Name = '{1}' AND ProbeFreeze.TissueId = " + - "Tissue.Id AND ProbeFreeze.InbredSetId = InbredSet.Id " + - "AND ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id " + + query = ("SELECT DISTINCT Tissue.Name " + "FROM ProbeFreeze, ProbeSetFreeze, InbredSet, " + "Tissue, Species WHERE Species.Name = '{0}' " + "AND Species.Id = InbredSet.SpeciesId AND " + "InbredSet.Name = '{1}' AND ProbeFreeze.TissueId = " + "Tissue.Id AND ProbeFreeze.InbredSetId = InbredSet.Id " + "AND ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id " "ORDER BY Tissue.Name").format(species, group) results = [] @@ -154,11 +154,11 @@ def build_datasets(species, group, type_name): datasets = [] if type_name == "Phenotypes": results = g.db.execute( - ("SELECT InfoFiles.GN_AccesionId, PublishFreeze.Name, " + - "PublishFreeze.FullName FROM InfoFiles, PublishFreeze, " + - "InbredSet WHERE InbredSet.Name = '{}' AND " + - "PublishFreeze.InbredSetId = InbredSet.Id AND " + - "InfoFiles.InfoPageName = PublishFreeze.Name " + + ("SELECT InfoFiles.GN_AccesionId, PublishFreeze.Name, " + "PublishFreeze.FullName FROM InfoFiles, PublishFreeze, " + "InbredSet WHERE InbredSet.Name = '{}' AND " + "PublishFreeze.InbredSetId = InbredSet.Id AND " + "InfoFiles.InfoPageName = PublishFreeze.Name " "ORDER BY PublishFreeze.CreateTime ASC").format(group)).fetchall() if bool(results): for result in results: -- cgit v1.2.3