Switch back from pk filtering to safe name

This commit is contained in:
2023-01-09 00:10:57 +01:00
parent 6fbea294da
commit 78f9faee5e
8 changed files with 44 additions and 24 deletions

View File

@@ -42,7 +42,7 @@
</tbody>
</table>
<div class="d-grid gap-2 mb-1 d-md-block">
<a class="btn btn-sm btn-outline-primary" href="{% url 'filtered' _filter="company" search=d.pk %}">Show all rolling stock</a>
<a class="btn btn-sm btn-outline-primary" href="{% url 'filtered' _filter="company" search=d.safe_name %}">Show all rolling stock</a>
{% if request.user.is_staff %}<a class="btn btn-sm btn-outline-danger" href="{% url 'admin:metadata_company_change' d.pk %}">Edit</a>{% endif %}
</div>
</div>