From 22f7d172c1ffb1b46e7e40d89b2ddc0cdbb5c39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yoshiki=20V=C3=A1zquez=20Baeza?= Date: Wed, 14 Sep 2016 10:52:54 -0700 Subject: [PATCH 1/3] DOC: Add note about reserved words --- .../doc/source/tutorials/prepare-information-files.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qiita_pet/support_files/doc/source/tutorials/prepare-information-files.rst b/qiita_pet/support_files/doc/source/tutorials/prepare-information-files.rst index 42a2b3f2e..85b1a303a 100644 --- a/qiita_pet/support_files/doc/source/tutorials/prepare-information-files.rst +++ b/qiita_pet/support_files/doc/source/tutorials/prepare-information-files.rst @@ -41,6 +41,9 @@ We support the following values: *Not applicable*, *Missing: Not collected*, *Mi For the latest definitions and explanation visit the `EBI/ENA Missing value reporting `__. +.. warning:: + Column names in your information files cannot be named as a Postgres reserved word. For example, a column cannot be named `CONDITION`, but could instead be named `DISEASE_CONDITION`. For a full list of these reserved words, see this `link `__. + Sample information file ----------------------- From 24fb85255c2543eaffd76fd2bf5a0d46fc2d7963 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Thu, 22 Sep 2016 11:36:32 -0600 Subject: [PATCH 2/3] issue-1914 --- qiita_pet/templates/study_ajax/prep_summary.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/qiita_pet/templates/study_ajax/prep_summary.html b/qiita_pet/templates/study_ajax/prep_summary.html index 25cf071fa..747706909 100644 --- a/qiita_pet/templates/study_ajax/prep_summary.html +++ b/qiita_pet/templates/study_ajax/prep_summary.html @@ -24,7 +24,7 @@ var options = { nodes: { color: '#ffffff', - font: '16px arial black' + font: '14px arial black' }, layout : { hierarchical: { @@ -202,7 +202,15 @@ nodes.push({id: data.node_labels[i][0], label: data.node_labels[i][1], shape: 'box'}); } - $("#graph-or-new-artifact-div").html("

- Files network

(Click nodes for more information)
"); + $("#graph-or-new-artifact-div").html( + "
" + + "
" + + "

- Files network

" + + "(Click nodes for more information)" + + "
" + + "
" + + "
" + + "
"); draw_graph(nodes, edges, "graph-network-div", function(params) { if(params.nodes.length === 1) { var artifact_id = +params.nodes[0]; From 65428515721a9307456a99f6d2fd52dc5b68ad76 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Mon, 26 Sep 2016 10:37:08 -0600 Subject: [PATCH 3/3] fix 1553 --- qiita_db/logger.py | 9 ++++++++- qiita_db/support_files/populate_test_db.sql | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/qiita_db/logger.py b/qiita_db/logger.py index 7522afd5f..dc29a360a 100644 --- a/qiita_db/logger.py +++ b/qiita_db/logger.py @@ -157,7 +157,14 @@ def info(self): logging_id = %s""".format(self._table) qdb.sql_connection.TRN.add(sql, [self.id]) - return loads(qdb.sql_connection.TRN.execute_fetchlast()) + rows = qdb.sql_connection.TRN.execute_fetchlast() + + if rows: + results = loads(rows) + else: + results = {} + + return results @property def msg(self): diff --git a/qiita_db/support_files/populate_test_db.sql b/qiita_db/support_files/populate_test_db.sql index e63da7ba0..7d59d7149 100644 --- a/qiita_db/support_files/populate_test_db.sql +++ b/qiita_db/support_files/populate_test_db.sql @@ -544,7 +544,8 @@ INSERT INTO qiita.message_user (message_id, email) VALUES (1, 'test@foo.bar'),(1 -- Create a loggin entry INSERT INTO qiita.logging (time, severity_id, msg, information) - VALUES ('Sun Nov 22 21:29:30 2015', 2, 'Error message', '{}'); + VALUES ('Sun Nov 22 21:29:30 2015', 2, 'Error message', NULL), + ('Sun Nov 22 21:29:30 2015', 2, 'Error message', '{}'); -- Create some processing jobs INSERT INTO qiita.processing_job