don't save active in cache

This commit is contained in:
Laura Klünder 2017-07-06 00:47:02 +02:00
parent aa76c58293
commit a7916ab3bb
2 changed files with 2 additions and 2 deletions

View file

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

View file

@ -215,7 +215,7 @@ def changeset_detail(request, pk):
obj_still_exists = pk not in changeset.deleted_existing.get(obj.__class__, ()) obj_still_exists = pk not in changeset.deleted_existing.get(obj.__class__, ())
edit_url = None edit_url = None
if obj_still_exists and active and can_edit and not isinstance(obj, LocationRedirect): if obj_still_exists and can_edit and not isinstance(obj, LocationRedirect):
reverse_kwargs = {'pk': obj.pk} reverse_kwargs = {'pk': obj.pk}
if hasattr(obj, 'level_id'): if hasattr(obj, 'level_id'):
reverse_kwargs['level'] = obj.level_id reverse_kwargs['level'] = obj.level_id