no twice no record found

This commit is contained in:
Massimo Di Pierro
2012-04-19 11:12:25 -05:00
parent ea6a3b65fd
commit 5a1cdb4e03
2 changed files with 5 additions and 4 deletions

View File

@@ -1 +1 @@
Version 1.99.7 (2012-04-19 11:08:58) dev
Version 1.99.7 (2012-04-19 11:12:22) dev

View File

@@ -1746,7 +1746,7 @@ class SQLFORM(FORM):
buttonclass='buttonadd',
buttontext=T('Add'),
buttonurl=url(args=['new',tablename])))
if csv:
if csv and nrows:
search_actions.append(gridbutton(
buttonclass='buttonexport',
buttontext=T('Export'),
@@ -1837,8 +1837,9 @@ class SQLFORM(FORM):
except SyntaxError:
rows = None
error = T("Query Not Supported")
message = error or T('%(nrows)s records found') % dict(nrows=nrows)
console.append(DIV(message,_class='web2py_counter'))
if nrows:
message = error or T('%(nrows)s records found') % dict(nrows=nrows)
console.append(DIV(message,_class='web2py_counter'))
if rows:
htmltable = TABLE(THEAD(head))