aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/db_info.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/wqflask/wqflask/db_info.py b/wqflask/wqflask/db_info.py
index 376ce14c..9fcd1421 100644
--- a/wqflask/wqflask/db_info.py
+++ b/wqflask/wqflask/db_info.py
@@ -44,13 +44,11 @@ class InfoPage:
if self.gn_accession_id:
cursor.execute(f"{query_base}GN_AccesionId = %s",
(self.gn_accession_id,))
- results = cursor.fetchone()
elif self.info_page_name:
cursor.execute(f"{query_base}InfoPageName = %s",
(self.info_page_name,))
- results = cursor.fetchone()
- if results:
- self.info = process_query_results(results)
+ if (results := cursor.fetchone()):
+ self.info = results
if ((not results or len(results) < 1)
and self.info_page_name and create):
return self.get_info()