Added message for empty resultsets

This commit is contained in:
giomba 2018-10-21 13:21:18 +02:00
parent c7fcbc6d39
commit 6ed59e39fe
1 changed files with 8 additions and 0 deletions

View File

@ -74,6 +74,14 @@ def getHTML(library):
html.append(body)
body.append(main)
main.append(h1)
# Check for empty resultset
if len(library) == 0:
p = ET.Element('p')
p.text = "No items"
main.append(p)
return tree
main.append(table)
# Build a beautiful table header