show changeset object edit_url for applied changesets too

This commit is contained in:
Laura Klünder 2024-12-02 11:43:03 +01:00
parent 8a35e72148
commit 7bdbd7a376
2 changed files with 2 additions and 2 deletions

View file

@ -86,7 +86,7 @@
<thead>
<tr>
<th colspan="2">
{% if obj.edit_url and active %}
{% if obj.edit_url %}
<a class="btn btn-default btn-xs pull-right" data-force-next-zoom href="{{ obj.edit_url }}">
{% trans 'Edit' %}
</a>

View file

@ -223,7 +223,7 @@ def changeset_detail(request, pk):
prev_values = changeset.changes.prev.get(changed_object.obj).values
edit_url = None
if not changed_object.deleted:
if not changed_object.deleted and (active or changeset.state == "applied"):
# todo: only if it's active
reverse_kwargs = {'pk': changed_object.obj.id}
if "space" in prev_values: