Skip to content

Commit

Permalink
Merge pull request #1956 from antgonza/fix-1553
Browse files Browse the repository at this point in the history
fix 1553
  • Loading branch information
mortonjt committed Sep 28, 2016
2 parents 4d5b395 + 6542851 commit e5e499d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion qiita_db/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 2 additions & 1 deletion qiita_db/support_files/populate_test_db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e5e499d

Please sign in to comment.