no search results message

nav-improvements
dsc 2 years ago
parent f809ebb70c
commit 3633cfe697

@ -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)

@ -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 %}

Loading…
Cancel
Save