user_list: Fix not counting router for mixed-case mail adresses

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
This commit is contained in:
Adrian Schmutzler 2018-08-13 16:05:12 +02:00
parent d3c8a7a64d
commit 05fda04ccd
2 changed files with 3 additions and 3 deletions

View File

@ -441,5 +441,5 @@ def router_user_sum(mysql):
result = {}
for rs in data:
if rs["contact"]:
result[rs["contact"]] = {"routers": rs["count"], "clients": rs["clients"]}
result[rs["contact"].lower()] = {"routers": rs["count"], "clients": rs["clients"]}
return result

View File

@ -41,8 +41,8 @@
<span class="glyphicon glyphicon-remove" title="Automatically imported stub from netmon"></span>
{%- endif -%}
</td>
<td>{{ user_routers.get(user.email, {}).get('routers', 0) }}</td>
<td>{{ user_routers.get(user.email, {}).get('clients', 0) }}</td>
<td>{{ user_routers.get(user.email.lower(), {}).get('routers', 0) }}</td>
<td>{{ user_routers.get(user.email.lower(), {}).get('clients', 0) }}</td>
</tr>
{%- endfor %}
</tbody>