no search results message

This commit is contained in:
dsc 2022-03-12 19:17:33 +02:00
parent f809ebb70c
commit 3633cfe697
2 changed files with 3 additions and 1 deletions

View File

@ -59,6 +59,8 @@ async def search():
users = [u for u in await User.search(needle)] users = [u for u in await User.search(needle)]
if users: if users:
return await render_template('search_results.html', users=users) return await render_template('search_results.html', users=users)
else:
return await render_template('search_results.html')
users = [u for u in User.select()] users = [u for u in User.select()]
return await render_template('search.html', users=users) return await render_template('search.html', users=users)

View File

@ -12,7 +12,7 @@
Result(s): {{users|length}} Result(s): {{users|length}}
{% if not users %} {% if not users %}
Nothing found... <br>Nothing found...
{% else %} {% else %}
<div id="addresses"> <div id="addresses">
{% for user in users %} {% for user in users %}