Save error details when executing to CSV, if no data is returned. This ensures the user gets some feedback rather than nothing at all. Fixes #1592

This commit is contained in:
Surinder Kumar
2016-09-20 11:57:51 +01:00
committed by Dave Page
parent f991354f9a
commit 28ce31a022
2 changed files with 13 additions and 9 deletions

View File

@@ -609,6 +609,7 @@ WHERE
if not results:
if not cur.closed:
cur.close()
yield gettext('"The query executed did not return any data."')
return
header = [c.to_dict()['name'] for c in cur.ordered_description()]