2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 04:55:44 +00:00

Fixes bug introduced by moving to pathlib (#3419)

* Fix typo

* Fix bug which prevented rendering of settings page if neither user-agent or user-device was available

* Add unit testing for settings page
This commit is contained in:
Oliver
2022-07-27 17:44:14 +10:00
committed by GitHub
parent ab654c3ae7
commit 851683a456
3 changed files with 84 additions and 1 deletions

View File

@ -248,7 +248,11 @@
{% for object in session_list %}
<tr {% if object.session_key == session_key %}class="active"{% endif %}>
<td>{{ object.ip }}</td>
{% if object.user_agent or object.device %}
<td>{{ object.user_agent|device|default_if_none:unknown_on_unknown|safe }}</td>
{% else %}
<td>{{ unknown_on_unknown }}</td>
{% endif %}
<td>
{% if object.session_key == session_key %}
{% blocktrans with time=object.last_activity|timesince %}{{ time }} ago (this session){% endblocktrans %}