Fix more foreing key usages
All checks were successful
ci/woodpecker/manual/woodpecker Pipeline was successful

Also refactors user info to class
This commit is contained in:
2023-08-06 05:43:47 +03:00
parent a637c2d2a1
commit c8b09d54f8
6 changed files with 56 additions and 51 deletions

View File

@@ -16,8 +16,8 @@
{% for item in items %}
<tr>
<td>{{ item | format_name }} {{ item.comment }}</td>
<td>{% if item.inventory.owner %}<a href="/m/user/{{ item.inventory.owner.foreign_id }}">{{ item.inventory.owner.username | display_name }}</a>{% endif %}</td>
<td>{% if item.inventory.user %}<a href="/m/user/{{ item.inventory.user.foreign_id }}">{{ item.inventory.user.username | display_name }}</a>{% endif %}</td>
<td>{% if item.inventory.owner %}<a href="/m/user/{{ item.inventory.owner.username }}">{{ item.inventory.owner.username | display_name }}</a>{% endif %}</td>
<td>{% if item.inventory.user %}<a href="/m/user/{{ item.inventory.user.username }}">{{ item.inventory.user.username | display_name }}</a>{% endif %}</td>
<td>
<form action="/m/inventory/{{item._id}}/{{action_path}}/{{slug}}" method="get">
<button class="waves-effect waves-light btn" type="submit">{{action_label}}</button>